From: Brian D. <br...@de...> - 2007-11-16 00:59:10
|
Rich Collins wrote: > When I change over to using dllspec, I get a bunch of errors like: It's spelled declspec. > gcc -o _build/binaries/io_static.exe _build/objs/main.o ../_build/lib/ > libiovmall.a > _build/objs/main.o: In function `main': > /home/Customer/io/tools/source/main.c:36: undefined reference to > `__imp__IoState_new' > /home/Customer/io/tools/source/main.c:40: undefined reference to > `__imp__IoState_init' > /home/Customer/io/tools/source/main.c:41: undefined reference to > `__imp__IoState_argc_argv_' > /home/Customer/io/tools/source/main.c:42: undefined reference to > `__imp__IoState_runCLI' > /home/Customer/io/tools/source/main.c:43: undefined reference to > `__imp__IoState_exitResult' > /home/Customer/io/tools/source/main.c:51: undefined reference to > `__imp__IoState_free' You're calling a function that was declared dllimport, but you're linking with a static library. That won't work. > The build script creates a dll and static version. I don't have to > compile 2 different object files, one with dllspec and one without, > do I? Yes, you do. Otherwise, it's back to living with thunks that can't be compared (and a very slight performance hit due to an extra indirect jump.) Brian |