Re: [pjsip] Win32 build doesn't build because of stddef.h

PI
Perry Ismangil
Thu, Nov 8, 2007 2:47 PM

On 11/8/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

Alright, got the checkout done. What next? :)

Well, describe what you do to try to compile it in Code::Blocks. And then
post any errors here. I know you have posted some errors before but we're
not clear on the steps you have taken to reach it.

Cheers,

--
Perry Ismangil

On 11/8/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > > > Alright, got the checkout done. What next? :) Well, describe what you do to try to compile it in Code::Blocks. And then post any errors here. I know you have posted some errors before but we're not clear on the steps you have taken to reach it. Cheers, -- Perry Ismangil
EI
Eagle I Martin Baranski
Thu, Nov 8, 2007 3:39 PM

2007/11/8, Perry Ismangil perry@pjsip.org:

On 11/8/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

Alright, got the checkout done. What next? :)

Well, describe what you do to try to compile it in Code::Blocks. And then
post any errors here. I know you have posted some errors before but we're
not clear on the steps you have taken to reach it.

Cheers,

Nothing easier than that..

At first, I rename the "config_site_sample.h" within the path
"pjlib\include\pj" to "config_site.h".

Then, I launch Code::Blocks (the devs their suggest using the latest
SVN-build, others won't work under Vista and are totally outdated),
open the "pjproject-vs8.sln"-file and then click 2 times "Yes",
because I want to compile PJSIP with my default set compiler and all
configuration data shall be imported.

After some waiting, I single-click the "pjsua"-item within the
project-management-tree at the left, choose "Debug Win32" from the
drop-down menu above the project-management, then a right-click at the
"pjsua"-item and a left-click at the context-menu-option called
"Build".

So, the building goes and and soon will fail and then, the message-box
at the bottom will jump to the "Build messages"-tab. But because I
want the whole log, I click the "Build log"-tab and the box then gives
me:

-------------- Build: Debug Win32 in pjsua ---------------
[ 33.3%] mingw32-c++.exe  -D_DEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32
-D_CONSOLE -Wall -g -O0  -march=athlon64 -O2 -O1 -O -Wmain -Wall
-DNDEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 -D_CONSOLE
-I....\pjsip\include -I....\pjlib\include -I....\pjlib-util\include
-I....\pjmedia\include -I....\pjnath\include -IC:\MinGW\include
-IC:\MinGW\include\c++\3.4.5 -IC:\MinGW\include\c++\3.4.5\backward
-IC:\MinGW\include\c++\3.4.5\mingw32
-IC:\MinGW\lib\gcc\mingw32\3.4.5\include -I"C:\Program
Files\System\Platform SDK\Windows\Include"
-IM:\pj-sip\pjsip-apps\src\pjsua -IM:\pj-sip\pjsip-apps -c
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c -o
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
cc1plus.exe: warning: command line option "-Wmain" is valid for C/ObjC
but not for C++
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function int read_config_file(pj_pool_t*, const char*, int*, char***)': M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:256: error: invalid conversion from void*' to char**' M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:317: error: invalid conversion from void*' to char*' M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function void
change_online_status()':
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:2257: warning: comparison
between signed and unsigned integer expressions
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 2 warnings

And that's all, the compiler says to me..
But to get that far, I had to add some stuff to the compiler settings,
which I'm going to describe for you now (I'm assuming you've installed
MinGW directly below the "C:"-root because of problems between Vista
and MinGW when using long pathnames):

Click "Settings" -> "Compiler and debugger..." -> "#defines"-tab (make
sure, the selected compiler is set to "GNU GCC Compiler") -> enter the
following into the box:

NDEBUG
PJ_WIN32=1
PJ_M_I386=1
WIN32
_CONSOLE

Then, click the "Toolchain"-tab -> "Auto-detect" (make sure, the path
to the left does NOT contain "\bin", e. g. "C:\MinGW", NOT
"C:\MinGW\bin")

Afterwards, click the "Additional Paths"-tab -> add
"C:\MinGW\libexec\gcc\mingw32\3.4.5"

After that, click the "Search directories"-tab, and below the
"Compiler"-sub-tab, there should be the following:

C:\MinGW\include
C:\MinGW\include\c++\3.4.5
C:\MinGW\include\c++\3.4.5\backward
C:\MinGW\include\c++\3.4.5\mingw32
C:\MinGW\lib\gcc\mingw32\3.4.5\include
C:\Program Files\System\Platform SDK\Windows\Include

Same goes for the "Linker"-sub-tab:

C:\MinGW\lib
C:\MinGW\lib\gcc\mingw32\3.4.5

And the "Resource"-sub-tab has just this:

C:\MinGW\include

Finally, click that tiny little arrow pointing to the right in the
upper window-part to get to the "Other settings"-tab. There, set the
following:

Compiler logging: Full command line
Check both entries starting with "Explicitely add..." and also both
entries starting with "Display build".

That's it - click OK and then that tiny blue gear at the upper-left window-part.

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/8, Perry Ismangil <perry@pjsip.org>: > On 11/8/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > > > > Alright, got the checkout done. What next? :) > > Well, describe what you do to try to compile it in Code::Blocks. And then > post any errors here. I know you have posted some errors before but we're > not clear on the steps you have taken to reach it. > > Cheers, Nothing easier than that.. At first, I rename the "config_site_sample.h" within the path "pjlib\include\pj" to "config_site.h". Then, I launch Code::Blocks (the devs their suggest using the latest SVN-build, others won't work under Vista and are totally outdated), open the "pjproject-vs8.sln"-file and then click 2 times "Yes", because I want to compile PJSIP with my default set compiler and all configuration data shall be imported. After some waiting, I single-click the "pjsua"-item within the project-management-tree at the left, choose "Debug Win32" from the drop-down menu above the project-management, then a right-click at the "pjsua"-item and a left-click at the context-menu-option called "Build". So, the building goes and and soon will fail and then, the message-box at the bottom will jump to the "Build messages"-tab. But because I want the whole log, I click the "Build log"-tab and the box then gives me: -------------- Build: Debug Win32 in pjsua --------------- [ 33.3%] mingw32-c++.exe -D_DEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 -D_CONSOLE -Wall -g -O0 -march=athlon64 -O2 -O1 -O -Wmain -Wall -DNDEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 -D_CONSOLE -I..\..\pjsip\include -I..\..\pjlib\include -I..\..\pjlib-util\include -I..\..\pjmedia\include -I..\..\pjnath\include -IC:\MinGW\include -IC:\MinGW\include\c++\3.4.5 -IC:\MinGW\include\c++\3.4.5\backward -IC:\MinGW\include\c++\3.4.5\mingw32 -IC:\MinGW\lib\gcc\mingw32\3.4.5\include -I"C:\Program Files\System\Platform SDK\Windows\Include" -IM:\pj-sip\pjsip-apps\src\pjsua -IM:\pj-sip\pjsip-apps -c M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c -o output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o cc1plus.exe: warning: command line option "-Wmain" is valid for C/ObjC but not for C++ M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function `int read_config_file(pj_pool_t*, const char*, int*, char***)': M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:256: error: invalid conversion from `void*' to `char**' M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:317: error: invalid conversion from `void*' to `char*' M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function `void change_online_status()': M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:2257: warning: comparison between signed and unsigned integer expressions Process terminated with status 1 (0 minutes, 0 seconds) 2 errors, 2 warnings And that's all, the compiler says to me.. But to get that far, I had to add some stuff to the compiler settings, which I'm going to describe for you now (I'm assuming you've installed MinGW directly below the "C:\"-root because of problems between Vista and MinGW when using long pathnames): Click "Settings" -> "Compiler and debugger..." -> "#defines"-tab (make sure, the selected compiler is set to "GNU GCC Compiler") -> enter the following into the box: NDEBUG PJ_WIN32=1 PJ_M_I386=1 WIN32 _CONSOLE Then, click the "Toolchain"-tab -> "Auto-detect" (make sure, the path to the left does NOT contain "\bin", e. g. "C:\MinGW", NOT "C:\MinGW\bin") Afterwards, click the "Additional Paths"-tab -> add "C:\MinGW\libexec\gcc\mingw32\3.4.5" After that, click the "Search directories"-tab, and below the "Compiler"-sub-tab, there should be the following: C:\MinGW\include C:\MinGW\include\c++\3.4.5 C:\MinGW\include\c++\3.4.5\backward C:\MinGW\include\c++\3.4.5\mingw32 C:\MinGW\lib\gcc\mingw32\3.4.5\include C:\Program Files\System\Platform SDK\Windows\Include Same goes for the "Linker"-sub-tab: C:\MinGW\lib C:\MinGW\lib\gcc\mingw32\3.4.5 And the "Resource"-sub-tab has just this: C:\MinGW\include Finally, click that tiny little arrow pointing to the right in the upper window-part to get to the "Other settings"-tab. There, set the following: Compiler logging: Full command line Check both entries starting with "Explicitely add..." and also both entries starting with "Display build". That's it - click OK and then that tiny blue gear at the upper-left window-part. -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================
L
logan
Thu, Nov 8, 2007 3:58 PM

Hi,

It looks to me that CodeBlocks is trying to compile PJSIP as a C++ project,
while it's a C project. Try to change the configurations so that it's
compiled as C project.

Thanks.

Best Regards,
Hitesh

----- Original Message -----
From: "Eagle I Martin Baranski" eagle3386@googlemail.com
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Thursday, November 08, 2007 9:09 PM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h

2007/11/8, Perry Ismangil perry@pjsip.org:

On 11/8/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

Alright, got the checkout done. What next? :)

Well, describe what you do to try to compile it in Code::Blocks. And then
post any errors here. I know you have posted some errors before but we're
not clear on the steps you have taken to reach it.

Cheers,

Nothing easier than that..

At first, I rename the "config_site_sample.h" within the path
"pjlib\include\pj" to "config_site.h".

Then, I launch Code::Blocks (the devs their suggest using the latest
SVN-build, others won't work under Vista and are totally outdated),
open the "pjproject-vs8.sln"-file and then click 2 times "Yes",
because I want to compile PJSIP with my default set compiler and all
configuration data shall be imported.

After some waiting, I single-click the "pjsua"-item within the
project-management-tree at the left, choose "Debug Win32" from the
drop-down menu above the project-management, then a right-click at the
"pjsua"-item and a left-click at the context-menu-option called
"Build".

So, the building goes and and soon will fail and then, the message-box
at the bottom will jump to the "Build messages"-tab. But because I
want the whole log, I click the "Build log"-tab and the box then gives
me:

-------------- Build: Debug Win32 in pjsua ---------------
[ 33.3%] mingw32-c++.exe  -D_DEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32
-D_CONSOLE -Wall -g -O0  -march=athlon64 -O2 -O1 -O -Wmain -Wall
-DNDEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 -D_CONSOLE
-I....\pjsip\include -I....\pjlib\include -I....\pjlib-util\include
-I....\pjmedia\include -I....\pjnath\include -IC:\MinGW\include
-IC:\MinGW\include\c++\3.4.5 -IC:\MinGW\include\c++\3.4.5\backward
-IC:\MinGW\include\c++\3.4.5\mingw32
-IC:\MinGW\lib\gcc\mingw32\3.4.5\include -I"C:\Program
Files\System\Platform SDK\Windows\Include"
-IM:\pj-sip\pjsip-apps\src\pjsua -IM:\pj-sip\pjsip-apps -c
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c -o
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
cc1plus.exe: warning: command line option "-Wmain" is valid for C/ObjC
but not for C++
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function int read_config_file(pj_pool_t*, const char*, int*, char***)': M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:256: error: invalid conversion from void*' to char**' M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:317: error: invalid conversion from void*' to char*' M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function void
change_online_status()':
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:2257: warning: comparison
between signed and unsigned integer expressions
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 2 warnings

And that's all, the compiler says to me..
But to get that far, I had to add some stuff to the compiler settings,
which I'm going to describe for you now (I'm assuming you've installed
MinGW directly below the "C:"-root because of problems between Vista
and MinGW when using long pathnames):

Click "Settings" -> "Compiler and debugger..." -> "#defines"-tab (make
sure, the selected compiler is set to "GNU GCC Compiler") -> enter the
following into the box:

NDEBUG
PJ_WIN32=1
PJ_M_I386=1
WIN32
_CONSOLE

Then, click the "Toolchain"-tab -> "Auto-detect" (make sure, the path
to the left does NOT contain "\bin", e. g. "C:\MinGW", NOT
"C:\MinGW\bin")

Afterwards, click the "Additional Paths"-tab -> add
"C:\MinGW\libexec\gcc\mingw32\3.4.5"

After that, click the "Search directories"-tab, and below the
"Compiler"-sub-tab, there should be the following:

C:\MinGW\include
C:\MinGW\include\c++\3.4.5
C:\MinGW\include\c++\3.4.5\backward
C:\MinGW\include\c++\3.4.5\mingw32
C:\MinGW\lib\gcc\mingw32\3.4.5\include
C:\Program Files\System\Platform SDK\Windows\Include

Same goes for the "Linker"-sub-tab:

C:\MinGW\lib
C:\MinGW\lib\gcc\mingw32\3.4.5

And the "Resource"-sub-tab has just this:

C:\MinGW\include

Finally, click that tiny little arrow pointing to the right in the
upper window-part to get to the "Other settings"-tab. There, set the
following:

Compiler logging: Full command line
Check both entries starting with "Explicitely add..." and also both
entries starting with "Display build".

That's it - click OK and then that tiny blue gear at the upper-left
window-part.

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi, It looks to me that CodeBlocks is trying to compile PJSIP as a C++ project, while it's a C project. Try to change the configurations so that it's compiled as C project. Thanks. Best Regards, Hitesh ----- Original Message ----- From: "Eagle I Martin Baranski" <eagle3386@googlemail.com> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org> Sent: Thursday, November 08, 2007 9:09 PM Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h > 2007/11/8, Perry Ismangil <perry@pjsip.org>: >> On 11/8/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: >> > >> > Alright, got the checkout done. What next? :) >> >> Well, describe what you do to try to compile it in Code::Blocks. And then >> post any errors here. I know you have posted some errors before but we're >> not clear on the steps you have taken to reach it. >> >> Cheers, > > Nothing easier than that.. > > At first, I rename the "config_site_sample.h" within the path > "pjlib\include\pj" to "config_site.h". > > Then, I launch Code::Blocks (the devs their suggest using the latest > SVN-build, others won't work under Vista and are totally outdated), > open the "pjproject-vs8.sln"-file and then click 2 times "Yes", > because I want to compile PJSIP with my default set compiler and all > configuration data shall be imported. > > After some waiting, I single-click the "pjsua"-item within the > project-management-tree at the left, choose "Debug Win32" from the > drop-down menu above the project-management, then a right-click at the > "pjsua"-item and a left-click at the context-menu-option called > "Build". > > So, the building goes and and soon will fail and then, the message-box > at the bottom will jump to the "Build messages"-tab. But because I > want the whole log, I click the "Build log"-tab and the box then gives > me: > > -------------- Build: Debug Win32 in pjsua --------------- > [ 33.3%] mingw32-c++.exe -D_DEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 > -D_CONSOLE -Wall -g -O0 -march=athlon64 -O2 -O1 -O -Wmain -Wall > -DNDEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 -D_CONSOLE > -I..\..\pjsip\include -I..\..\pjlib\include -I..\..\pjlib-util\include > -I..\..\pjmedia\include -I..\..\pjnath\include -IC:\MinGW\include > -IC:\MinGW\include\c++\3.4.5 -IC:\MinGW\include\c++\3.4.5\backward > -IC:\MinGW\include\c++\3.4.5\mingw32 > -IC:\MinGW\lib\gcc\mingw32\3.4.5\include -I"C:\Program > Files\System\Platform SDK\Windows\Include" > -IM:\pj-sip\pjsip-apps\src\pjsua -IM:\pj-sip\pjsip-apps -c > M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c -o > output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o > cc1plus.exe: warning: command line option "-Wmain" is valid for C/ObjC > but not for C++ > M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function `int > read_config_file(pj_pool_t*, const char*, int*, char***)': > M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:256: error: invalid > conversion from `void*' to `char**' > M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:317: error: invalid > conversion from `void*' to `char*' > M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function `void > change_online_status()': > M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:2257: warning: comparison > between signed and unsigned integer expressions > Process terminated with status 1 (0 minutes, 0 seconds) > 2 errors, 2 warnings > > And that's all, the compiler says to me.. > But to get that far, I had to add some stuff to the compiler settings, > which I'm going to describe for you now (I'm assuming you've installed > MinGW directly below the "C:\"-root because of problems between Vista > and MinGW when using long pathnames): > > Click "Settings" -> "Compiler and debugger..." -> "#defines"-tab (make > sure, the selected compiler is set to "GNU GCC Compiler") -> enter the > following into the box: > > NDEBUG > PJ_WIN32=1 > PJ_M_I386=1 > WIN32 > _CONSOLE > > Then, click the "Toolchain"-tab -> "Auto-detect" (make sure, the path > to the left does NOT contain "\bin", e. g. "C:\MinGW", NOT > "C:\MinGW\bin") > > Afterwards, click the "Additional Paths"-tab -> add > "C:\MinGW\libexec\gcc\mingw32\3.4.5" > > After that, click the "Search directories"-tab, and below the > "Compiler"-sub-tab, there should be the following: > > C:\MinGW\include > C:\MinGW\include\c++\3.4.5 > C:\MinGW\include\c++\3.4.5\backward > C:\MinGW\include\c++\3.4.5\mingw32 > C:\MinGW\lib\gcc\mingw32\3.4.5\include > C:\Program Files\System\Platform SDK\Windows\Include > > Same goes for the "Linker"-sub-tab: > > C:\MinGW\lib > C:\MinGW\lib\gcc\mingw32\3.4.5 > > And the "Resource"-sub-tab has just this: > > C:\MinGW\include > > > Finally, click that tiny little arrow pointing to the right in the > upper window-part to get to the "Other settings"-tab. There, set the > following: > > Compiler logging: Full command line > Check both entries starting with "Explicitely add..." and also both > entries starting with "Display build". > > That's it - click OK and then that tiny blue gear at the upper-left > window-part. > -- > ===================== > = ~ Code is poetry ~ > ===================== > = Martin Baranski > = Eagle | Eagle3386 > = www.troublezone.net > = eagle3386@gmail.com > = +49 (0)160 93317843 > ===================== > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
EI
Eagle I Martin Baranski
Thu, Nov 8, 2007 6:19 PM

2007/11/8, logan logan04x@gmail.com:

Hi,

It looks to me that CodeBlocks is trying to compile PJSIP as a C++ project,
while it's a C project. Try to change the configurations so that it's
compiled as C project.

Thanks.

Hi,

thanks for that hint.. Although Code::Blocks normally determines the
needed compiler by looking at the file's extension (.c = C, .cpp =
C++), there seem to be some problems..

Therefore I did 2 things:

  1. Go into the compiler-settings once again (Settings -> Compiler and
    debugger... -> "Toolchain"-tab -> the item for "C compiler" and
    "Linker for dynamic libs" should be "mingw32-gcc.exe" ("C++ compiler"
    should be "mingw32-g++.exe") and nothing else..

  2. Right-click at the pjsua-project and select "Build options..." ->
    "Other options"-tab -> enter "-x c" (that forces gcc to explicitly
    compile C instead of C++)

The correctness of the changes can be checked by checking "Enable
warnings demanded by strict ISO C and ISO C++ [-pedantic]" at the
"Compiler flags"-tab, because that gives some warnings about
C++-styled comments in some files.. ;)

Anyway, after all that, I still got errors:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o ..\bin\pjsua_vc8d.exe
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o  -s -s  -lIphlpapi
-ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32
-lole32 -luser32
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function my_atoi': M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to pj_strtoul'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:354: undefined reference to
pj_strtoul' output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function write_settings':
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1128: undefined reference
to pj_strcat2' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1131: undefined reference to pj_strcat2'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1135: undefined reference
to pj_strcat2' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1042: undefined reference to pj_strcat2'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1105: undefined reference
to pj_strcat2' output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o:M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1087: more undefined references to pj_strcat2' follow

(There are more, but I got told that the first error often involves
more errors and so fixing the first might fix others as well..)

--

= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/8, logan <logan04x@gmail.com>: > Hi, > > It looks to me that CodeBlocks is trying to compile PJSIP as a C++ project, > while it's a C project. Try to change the configurations so that it's > compiled as C project. > > Thanks. Hi, thanks for that hint.. Although Code::Blocks normally determines the needed compiler by looking at the file's extension (.c = C, .cpp = C++), there seem to be some problems.. Therefore I did 2 things: 1. Go into the compiler-settings once again (Settings -> Compiler and debugger... -> "Toolchain"-tab -> the item for "C compiler" and "Linker for dynamic libs" should be "mingw32-gcc.exe" ("C++ compiler" should be "mingw32-g++.exe") and nothing else.. 2. Right-click at the pjsua-project and select "Build options..." -> "Other options"-tab -> enter "-x c" (that forces gcc to explicitly compile C instead of C++) The correctness of the changes can be checked by checking "Enable warnings demanded by strict ISO C and ISO C++ [-pedantic]" at the "Compiler flags"-tab, because that gives some warnings about C++-styled comments in some files.. ;) Anyway, after all that, I still got errors: [100.0%] mingw32-gcc.exe -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjsua_vc8d.exe output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o -s -s -lIphlpapi -ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -lole32 -luser32 output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function `my_atoi': M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to `pj_strtoul' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:354: undefined reference to `pj_strtoul' output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function `write_settings': M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1128: undefined reference to `pj_strcat2' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1131: undefined reference to `pj_strcat2' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1135: undefined reference to `pj_strcat2' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1042: undefined reference to `pj_strcat2' M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1105: undefined reference to `pj_strcat2' output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o:M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1087: more undefined references to `pj_strcat2' follow (There are more, but I got told that the first error often involves more errors and so fixing the first might fix others as well..) -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================
PI
Perry Ismangil
Fri, Nov 9, 2007 10:17 AM

On 11/8/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o ..\bin\pjsua_vc8d.exe
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o  -s -s  -lIphlpapi
-ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32
-lole32 -luser32
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function my_atoi': M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to pj_strtoul'

Ok, you're past compile problems now and on to linking problems. So
'undefined reference' errors are usually to do with the libraries you
have compiled not being referenced.

You can see the '-l' arguments does not specify pjxxxx libraries anywhere.

On http://www.pjsip.org/trac/wiki/Getting_Started_Using there are some
hints on what libraries are needed. You need to add those somewhere in
your IDE to the libraries that needs to be linked.

Cheers,

--
Perry Ismangil

On 11/8/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > [100.0%] mingw32-gcc.exe -LC:\MinGW\lib > -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjsua_vc8d.exe > output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o > output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o -s -s -lIphlpapi > -ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 > -lole32 -luser32 > output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function `my_atoi': > M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to > `pj_strtoul' Ok, you're past compile problems now and on to linking problems. So 'undefined reference' errors are usually to do with the libraries you have compiled not being referenced. You can see the '-l' arguments does not specify pjxxxx libraries anywhere. On http://www.pjsip.org/trac/wiki/Getting_Started_Using there are some hints on what libraries are needed. You need to add those somewhere in your IDE to the libraries that needs to be linked. Cheers, -- Perry Ismangil
EI
Eagle I Martin Baranski
Fri, Nov 9, 2007 4:46 PM

2007/11/9, Perry Ismangil perry@pjsip.org:

On 11/8/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o ..\bin\pjsua_vc8d.exe
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o  -s -s  -lIphlpapi
-ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32
-lole32 -luser32
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function my_atoi': M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to pj_strtoul'

Ok, you're past compile problems now and on to linking problems. So
'undefined reference' errors are usually to do with the libraries you
have compiled not being referenced.

You can see the '-l' arguments does not specify pjxxxx libraries anywhere.

On http://www.pjsip.org/trac/wiki/Getting_Started_Using there are some
hints on what libraries are needed. You need to add those somewhere in
your IDE to the libraries that needs to be linked.

Alright, looked at the link you gave me.. IMHO, I need to add
pjlib/lib, pjlib-util/lib, pjmedia/lib and pjsip/lib..

So, I've added their paths to the linker's search-paths.. But as that
failed (and because you talked about "-l" and the log talked about e.
g. "-L....\pjlib\lib"), I took some time, reading the trac-ticket
once more and then got the thought that I might need to add

-lpjsua-${TARGET_NAME}
-lpjsip-ua-${TARGET_NAME}
-lpjsip-simple-${TARGET_NAME}
-lpjsip-${TARGET_NAME}
-lpjmedia-codec-${TARGET_NAME}
-lpjmedia-${TARGET_NAME}
-lpjmedia-codec-${TARGET_NAME}
-lpjlib-util-${TARGET_NAME}
-lpj-${TARGET_NAME}
-lm
-lpthread
-lasound
-lssl

to the linker's options (instead of adding some paths to search for
libraries) and so I did that.. But GCC then told me:

[100.0%] mingw32-gcc.exe -L....\pjlib\lib -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o ..\bin\pjsua_vc8d.exe
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o  -s -lpjsua-Debug
Win32\ -lpjsip-ua-Debug Win32\ -lpjsip-simple-Debug Win32
-lpjsip-Debug Win32\ -lpjmedia-codec-Debug Win32\ -lpjmedia-Debug
Win32\ -lpjmedia-codec-Debug Win32\ -lpjlib-util-Debug Win32
-lpj-Debug Win32\ -lm\ -lpthread\ -lasound\ -lssl -s  -lIphlpapi
-ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32
-lole32 -luser32
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
mingw32-gcc.exe: Win32: No such file or directory
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings

("Debug Win32" is how Code::Blocks calls my build target - the other
option would be "Release Win32"..)

But I refused to give up, so I tried the linker's options without that
"-${TARGET_NAME}"-stuff (e. g. "-lpjsua" instead of
"-lpjsua-${TARGET_NAME}") which seemed to work until.. Well..

[100.0%] mingw32-gcc.exe -L....\pjlib\lib -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o ..\bin\pjsua_vc8d.exe
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o  -s -lpjsua
-lpjsip-ua\ -lpjsip-simple\ -lpjsip\ -lpjmedia-codec\ -lpjmedia
-lpjmedia-codec\ -lpjlib-util\ -lpj\ -lm\ -lpthread\ -lasound\ -lssl
-s  -lIphlpapi -ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32
-lodbc32 -lodbccp32 -lole32 -luser32
C:\MinGW\bin..\lib\gcc\mingw32\3.4.5........\mingw32\bin\ld.exe:
cannot find -lpjsua
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings

Is that because PJSIP is stored on M:, but MinGW is on the C:-drive?

Regards,
Martin.. :)

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/9, Perry Ismangil <perry@pjsip.org>: > On 11/8/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > > > [100.0%] mingw32-gcc.exe -LC:\MinGW\lib > > -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjsua_vc8d.exe > > output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o > > output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o -s -s -lIphlpapi > > -ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 > > -lole32 -luser32 > > output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function `my_atoi': > > M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to > > `pj_strtoul' > > Ok, you're past compile problems now and on to linking problems. So > 'undefined reference' errors are usually to do with the libraries you > have compiled not being referenced. > > You can see the '-l' arguments does not specify pjxxxx libraries anywhere. > > On http://www.pjsip.org/trac/wiki/Getting_Started_Using there are some > hints on what libraries are needed. You need to add those somewhere in > your IDE to the libraries that needs to be linked. Alright, looked at the link you gave me.. IMHO, I need to add pjlib/lib, pjlib-util/lib, pjmedia/lib and pjsip/lib.. So, I've added their paths to the linker's search-paths.. But as that failed (and because you talked about "-l" and the log talked about e. g. "-L..\..\pjlib\lib"), I took some time, reading the trac-ticket once more and then got the thought that I might need to add -lpjsua-${TARGET_NAME}\ -lpjsip-ua-${TARGET_NAME}\ -lpjsip-simple-${TARGET_NAME}\ -lpjsip-${TARGET_NAME}\ -lpjmedia-codec-${TARGET_NAME}\ -lpjmedia-${TARGET_NAME}\ -lpjmedia-codec-${TARGET_NAME}\ -lpjlib-util-${TARGET_NAME}\ -lpj-${TARGET_NAME}\ -lm\ -lpthread\ -lasound\ -lssl to the linker's options (instead of adding some paths to search for libraries) and so I did that.. But GCC then told me: [100.0%] mingw32-gcc.exe -L..\..\pjlib\lib -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjsua_vc8d.exe output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o -s -lpjsua-Debug Win32\ -lpjsip-ua-Debug Win32\ -lpjsip-simple-Debug Win32\ -lpjsip-Debug Win32\ -lpjmedia-codec-Debug Win32\ -lpjmedia-Debug Win32\ -lpjmedia-codec-Debug Win32\ -lpjlib-util-Debug Win32\ -lpj-Debug Win32\ -lm\ -lpthread\ -lasound\ -lssl -s -lIphlpapi -ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -lole32 -luser32 mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory mingw32-gcc.exe: Win32\: No such file or directory Process terminated with status 1 (0 minutes, 2 seconds) 0 errors, 0 warnings ("Debug Win32" is how Code::Blocks calls my build target - the other option would be "Release Win32"..) But I refused to give up, so I tried the linker's options without that "-${TARGET_NAME}"-stuff (e. g. "-lpjsua\" instead of "-lpjsua-${TARGET_NAME}\") which seemed to work until.. Well.. [100.0%] mingw32-gcc.exe -L..\..\pjlib\lib -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjsua_vc8d.exe output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o -s -lpjsua\ -lpjsip-ua\ -lpjsip-simple\ -lpjsip\ -lpjmedia-codec\ -lpjmedia\ -lpjmedia-codec\ -lpjlib-util\ -lpj\ -lm\ -lpthread\ -lasound\ -lssl -s -lIphlpapi -ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -lole32 -luser32 C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lpjsua\ collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 1 seconds) 1 errors, 0 warnings Is that because PJSIP is stored on M:\, but MinGW is on the C:\-drive? Regards, Martin.. :) -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================
PI
Perry Ismangil
Fri, Nov 9, 2007 5:17 PM

On 11/9/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

Is that because PJSIP is stored on M:, but MinGW is on the C:-drive?

No, it's not. '-l' takes an actual library name. '-L' is library path.

Let's start from the bottom:

  • Don't build pjsua just yet, it is too big with too many libraries
  • Start by building pjlib.
  • Then we will know the actual physical name of pjlib
  • report any errors

Cheers,

--
Perry Ismangil

On 11/9/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > > Is that because PJSIP is stored on M:\, but MinGW is on the C:\-drive? > No, it's not. '-l' takes an actual library name. '-L' is library path. Let's start from the bottom: - Don't build pjsua just yet, it is too big with too many libraries - Start by building pjlib. - Then we will know the actual physical name of pjlib - report any errors Cheers, -- Perry Ismangil
EI
Eagle I Martin Baranski
Fri, Nov 9, 2007 6:52 PM

2007/11/9, Perry Ismangil perry@pjsip.org:

On 11/9/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

Is that because PJSIP is stored on M:, but MinGW is on the C:-drive?

No, it's not. '-l' takes an actual library name. '-L' is library path.

Let's start from the bottom:

  • Don't build pjsua just yet, it is too big with too many libraries
  • Start by building pjlib.
  • Then we will know the actual physical name of pjlib
  • report any errors

Good, then my second thought was right.. I did think about that PJSIP
needs to build its own library before the actual application can be
compiled.. ;)

Anyway, the compiling of pjlib worked just fine - last command was:

ar.exe: creating ..\lib\libpjlib-i386-win32-vc8-debug.a
Output size is 2.87 MB
Process terminated with status 0 (0 minutes, 7 seconds)
0 errors, 0 warnings

That's an amazing feeling.. No errors, no warnings - great! :D

Regards,
Martin.. :)

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/9, Perry Ismangil <perry@pjsip.org>: > On 11/9/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > > > > Is that because PJSIP is stored on M:\, but MinGW is on the C:\-drive? > > > > No, it's not. '-l' takes an actual library name. '-L' is library path. > > Let's start from the bottom: > > - Don't build pjsua just yet, it is too big with too many libraries > - Start by building pjlib. > - Then we will know the actual physical name of pjlib > - report any errors Good, then my second thought was right.. I did think about that PJSIP needs to build its own library before the actual application can be compiled.. ;) Anyway, the compiling of pjlib worked just fine - last command was: ar.exe: creating ..\lib\libpjlib-i386-win32-vc8-debug.a Output size is 2.87 MB Process terminated with status 0 (0 minutes, 7 seconds) 0 errors, 0 warnings That's an amazing feeling.. No errors, no warnings - great! :D Regards, Martin.. :) -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================
P
perry@pjsip.org
Sat, Nov 10, 2007 8:16 AM

Excellent!

Now we know the name of pjlib file on disk. That name will need to be
referenced on applications that use pjlib.

Next, try to build pjlib-test. If it complains of unreferenced stuff
put the pjlib already build as -l.

On 11/9/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

2007/11/9, Perry Ismangil perry@pjsip.org:

On 11/9/07, Eagle I Martin Baranski eagle3386@googlemail.com wrote:

Is that because PJSIP is stored on M:, but MinGW is on the C:-drive?

No, it's not. '-l' takes an actual library name. '-L' is library path.

Let's start from the bottom:

  • Don't build pjsua just yet, it is too big with too many libraries
  • Start by building pjlib.
  • Then we will know the actual physical name of pjlib
  • report any errors

Good, then my second thought was right.. I did think about that PJSIP
needs to build its own library before the actual application can be
compiled.. ;)

Anyway, the compiling of pjlib worked just fine - last command was:

ar.exe: creating ..\lib\libpjlib-i386-win32-vc8-debug.a
Output size is 2.87 MB
Process terminated with status 0 (0 minutes, 7 seconds)
0 errors, 0 warnings

That's an amazing feeling.. No errors, no warnings - great! :D

Regards,
Martin.. :)

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

--
Perry Ismangil
Mobile: +44 7761 179 575
http://www.pjsip.org

PJSIP LLP
23 Langdon Street, Sheffield S11 8BH, United Kingdom
T +44 114 299 8883 F +44 7092 216 3097
Registered in England no. OC323977

Excellent! Now we know the name of pjlib file on disk. That name will need to be referenced on applications that use pjlib. Next, try to build pjlib-test. If it complains of unreferenced stuff put the pjlib already build as -l. On 11/9/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > 2007/11/9, Perry Ismangil <perry@pjsip.org>: > > On 11/9/07, Eagle I Martin Baranski <eagle3386@googlemail.com> wrote: > > > > > > Is that because PJSIP is stored on M:\, but MinGW is on the C:\-drive? > > > > > > > No, it's not. '-l' takes an actual library name. '-L' is library path. > > > > Let's start from the bottom: > > > > - Don't build pjsua just yet, it is too big with too many libraries > > - Start by building pjlib. > > - Then we will know the actual physical name of pjlib > > - report any errors > > Good, then my second thought was right.. I did think about that PJSIP > needs to build its own library before the actual application can be > compiled.. ;) > > Anyway, the compiling of pjlib worked just fine - last command was: > > ar.exe: creating ..\lib\libpjlib-i386-win32-vc8-debug.a > Output size is 2.87 MB > Process terminated with status 0 (0 minutes, 7 seconds) > 0 errors, 0 warnings > > That's an amazing feeling.. No errors, no warnings - great! :D > > > Regards, > Martin.. :) > -- > ===================== > = ~ Code is poetry ~ > ===================== > = Martin Baranski > = Eagle | Eagle3386 > = www.troublezone.net > = eagle3386@gmail.com > = +49 (0)160 93317843 > ===================== > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -- Perry Ismangil Mobile: +44 7761 179 575 http://www.pjsip.org PJSIP LLP 23 Langdon Street, Sheffield S11 8BH, United Kingdom T +44 114 299 8883 F +44 7092 216 3097 Registered in England no. OC323977
EI
Eagle I Martin Baranski
Sat, Nov 10, 2007 2:05 PM

Excellent!

Now we know the name of pjlib file on disk. That name will need to be
referenced on applications that use pjlib.

Next, try to build pjlib-test. If it complains of unreferenced stuff
put the pjlib already build as -l.

Thanks! :)

Yes, it complains about unreferenced stuff.. Therefore, I've added
"-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a" to the
linker's options, but that didn't solve the problem (even just adding
"-llibpjlib-i386-win32-vc8-debug.a" didn't help.. Full error:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o
..\bin\pjlib-test-i386-win32-vc8-debug.exe
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\atomic.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\echo_clt.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\errno.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\exception.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\fifobuf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\file.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_perf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_tcp.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_udp.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_unreg.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\list.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\main.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\mutex.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\os.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool_perf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rand.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rbtree.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\select.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sleep.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock_perf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\string.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\test.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\thread.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timer.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timestamp.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_ioqueue.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_sync.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\util.o
-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s  -lnetapi32
-lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
C:\MinGW\bin..\lib\gcc\mingw32\3.4.5........\mingw32\bin\ld.exe:
cannot find -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 8 seconds)
1 errors, 0 warnings

Did I miss something? - Since I want to fix as much stuff as possible
by my own, I played a bit around with the linker's settings (there's
list with libraries at the left and a textarea for entering custom
options at the right - the "-l"-stuff goes into that textarea) and
added the "libpjlib-i386-win32-vc8-debug.a"-file to the list at the
left - that seemed to work a bit better, but I then got this:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o
..\bin\pjlib-test-i386-win32-vc8-debug.exe
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\atomic.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\echo_clt.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\errno.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\exception.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\fifobuf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\file.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_perf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_tcp.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_udp.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_unreg.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\list.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\main.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\mutex.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\os.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool_perf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rand.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rbtree.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\select.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sleep.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock_perf.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\string.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\test.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\thread.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timer.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timestamp.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_ioqueue.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_sync.o
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\util.o  -s
-lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a
M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a(os_core_win32.o):
In function pj_init': M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to WSAStartup@8'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
`WSAGetLastError@0'

So, although there's no "-l" before the absolute path to the
pjlib-file, it seems to work, because the linker doesn't complain
about "file not found"..

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/10, perry@pjsip.org <perry@pjsip.org>: > Excellent! > > Now we know the name of pjlib file on disk. That name will need to be > referenced on applications that use pjlib. > > Next, try to build pjlib-test. If it complains of unreferenced stuff > put the pjlib already build as -l. Thanks! :) Yes, it complains about unreferenced stuff.. Therefore, I've added "-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a" to the linker's options, but that didn't solve the problem (even just adding "-llibpjlib-i386-win32-vc8-debug.a" didn't help.. Full error: [100.0%] mingw32-gcc.exe -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjlib-test-i386-win32-vc8-debug.exe output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\atomic.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\echo_clt.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\errno.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\exception.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\fifobuf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\file.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_perf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_tcp.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_udp.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_unreg.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\list.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\main.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\mutex.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\os.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool_perf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rand.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rbtree.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\select.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sleep.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock_perf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\string.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\test.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\thread.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timer.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timestamp.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_ioqueue.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_sync.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\util.o -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32 C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 8 seconds) 1 errors, 0 warnings Did I miss something? - Since I want to fix as much stuff as possible by my own, I played a bit around with the linker's settings (there's list with libraries at the left and a textarea for entering custom options at the right - the "-l"-stuff goes into that textarea) and added the "libpjlib-i386-win32-vc8-debug.a"-file to the list at the left - that seemed to work a bit better, but I then got this: [100.0%] mingw32-gcc.exe -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -o ..\bin\pjlib-test-i386-win32-vc8-debug.exe output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\atomic.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\echo_clt.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\errno.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\exception.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\fifobuf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\file.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_perf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_tcp.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_udp.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_unreg.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\list.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\main.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\mutex.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\os.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool_perf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rand.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rbtree.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\select.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sleep.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock_perf.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\string.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\test.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\thread.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timer.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timestamp.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_ioqueue.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_sync.o output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\util.o -s -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32 M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a(os_core_win32.o): In function `pj_init': M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to `WSAStartup@8' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to `WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to `WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to `WSAGetLastError@0' So, although there's no "-l" before the absolute path to the pjlib-file, it seems to work, because the linker doesn't complain about "file not found".. -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================