Gregor -
Try one of the following:
- using console:
gcc myprog.c preObj.o -o myprog.exe
- using Dev C++:
rename preObj.o libpreObj.a
under "compiler options", add: -LD:\Gregor\...\scanner\ -lpreObj
At 02.41 23/07/01 +0200, you wrote:
>Hey folks,
>
>I wann a use a function --lets say "int doIt( void )"-- from a
>selfwritten, precompiled library --I called it "preObj.o"--
>
>Should be the same like "printf(..)" from "stdio" (I am not shure if the
>std* libs are precompiled, but it would make sense, won't it)
>
>Ok.
>
>1) I wrote my lib, saved it as "preOb.c"
>2) compiled it via "gcc -c preObj.c"
>3) and recived "preObj.o"
>
>The program which wanna use my "doIt()" out of my lib contains "#include
>"preObj.h" " with the header of my function.
>
>I told DevC++ to link my lib after compiling by checking 'Add following
>commands when calling compiler' under "Compiler Options" and adding
>"-lpreObj.o" into the field.
>
>To give the compiler a chance to find my lib I gave it the path under
>"Libraries Directory" wich is now
>"DEV-C++\Lib;D:\Gregor\Cpp\API\Petzold\scanner\" (My lib's path is
>"D:\Gregor\...\scanner\preObj.o" )
>
>But instead of compiling and linking and giving me a running EXE-File I
>get this error message:
><ERRmsg>
>
>Building resource file...
>D:\PROGRA~1\DEV-C_~1\BIN\windres --include-dir
>D:/PROGRA~1/DEV-C_~1/INCLUDE/ --include-dir
>D:/PROGRA~1/DEV-C_~1/INCLUDE/G__~1 --include-dir
>D:/PROGRA~1/DEV-C_~1/INCLUDE/ --use-temp-file -I rc -O coff -i
>D:/GREGOR/CPP/API/PETZOLD/RSRC.RC -o d:/gregor/cpp/api/petzold/rsrc.o
>Compiling files :
>D:\PROGRA~1\DEV-C_~1\BIN\g++ "d:/gregor/cpp/api/petzold/gerts.cpp"
>"d:/gregor/cpp/api/petzold/picture.cpp"
>"d:/gregor/cpp/api/petzold/position.cpp"
>"d:/gregor/cpp/api/petzold/font.cpp"
>"d:/gregor/cpp/api/petzold/dibfile.c"
>"d:/gregor/cpp/api/petzold/response.cpp" -c -ggdb -mwindows -lpreObj.o
>-ID:/PROGRA~1/DEV-C_~1/INCLUDE/ -ID:/PROGRA~1/DEV-C_~1/INCLUDE/G__~1
>-ID:/PROGRA~1/DEV-C_~1/INCLUDE/ -LD:/PROGRA~1/DEV-C_~1/LIB/
>-LD:/GREGOR/CPP/API/PETZOLD/SCANNER/ -BD:/PROGRA~1/DEV-C_~1/BIN/
>
><\ERRmsg>
>
>Can someone read, mean understand what I did wrong?
>If so It would be great to tell me :-)
>
> Gregor
>
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
--
gisan
gi...@li...
|