Archives for: December 2005, 29

29 December, 2005

Permalink 18:00 UTC, by KingTaco, 138 words, 2352 views   English (US)
Categories: Gentoo

Part 1: tools for win32 development in linux

emerge the following packages to create a development environment:


dev-util/xmingw-binutils
dev-util/xmingw-gcc
dev-util/xmingw-runtime
dev-util/xmingw-w32api
app-emulation/wine

Use the following as a template for win32 makefiles:

CC=i386-mingw32msvc-gcc
CFLAGS=-O2 -pipe -std=c99 -mno-cygwin -mno-sse -mno-sse2 -mno-mmx -mthreads -DWIN32 -D_WIN32 -D_WINDOWS

helloworld.exe: helloworld.o
$(CC) $(CFLAGS) -luser32 -o $@ $?

helloworld.o: helloworld.c helloworld.h
$(CC) $(CFLAGS) -o $@ -c $<

NOTE: Now is not a good time to rice out your cflags. Debugging win32 code is hard enough without the compiler playing tricks on you.

To test your new win32 program: wine ./helloworld.exe

Part 2 will talk about how to create win32 DLLs and import libraries.

*EDIT* I'm sick of all the lame losers out there that keep spamming my blog, so no more comments until something can be worked out

Mike Doty

December 2005
Mon Tue Wed Thu Fri Sat Sun
  Current > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Search

Categories

Misc

XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 57

powered by
b2evolution