Can't get DLL to Build [SOLVED]

new topic     » topic index » view thread      » older message » newer message

Hi all,

I've been wanting to make a wrapper for this library, but haven't been able to build the DLL for it.

[https://github.com/JettMonstersGoBoom/tigr] TIGR LIBRARY

CFLAGS += -I../.. -Os -s -DTIGR_SHARED 
ifeq ($(OS),Windows_NT) 
	LDFLAGS += -s -lopengl32 -lgdi32 
	DLL = dll 
	EXT = exe 
else 
	UNAME_S := $(shell uname -s) 
	DLL = so 
	EXT =  
	ifeq ($(UNAME_S),Darwin) 
		LDFLAGS += -framework OpenGL -framework Cocoa 
	else ifeq ($(UNAME_S),Linux) 
		LDFLAGS += -s -lGLU -lGL -lX11 
	endif 
endif 
 
 
hello.$(EXT) : hello.c tigr.$(DLL)  
	gcc $^ -Os -o $@ $(CFLAGS) $(LDFLAGS) 
 
tigr.$(DLL): 
	gcc ../../tigr.c -DTIGR_BUILDSHARED -shared $(CFLAGS) $(LDFLAGS) -o tigr.$(DLL) 
 
clean: 
	rm hello.$(ext) 

When I try to build with Mingw32 it gives these errors:

undefined reference to `__mingw_winmain_hInstance' 
undefined reference to `__mingw_winmain_lpCmdLine' 
undefined reference to `__mingw_winmain_nShowCmd' 

Strangley it builds fine using GCC

gcc -c tigr.c 
 
no errors and it builds fine 

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu