473,395 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

g++ ptypes compilation

After successfull build of ptypes I create a catalog: my_ptypes_test on
ptypes root (like wshare) place there the code of multithreaded server
taken from
http://www.melikyan.com/ptypes/doc/async.examples.html
into file my_ptypes_test.cpp.

Compile command line:

g++ -pthread -D_GNU_SOURCE -DDEBUG -I../include -Wall -O2
.../lib/libptypes.a -o my_ptypes_test my_ptypes_test.cpp

brings a 8kb of "undefined reference to"

The output is the same when I remove ../lib/libptypes.a from command
line. But no info about libptypes.a fail to load and the file exist for
sure

please help! thx!
Jul 23 '05 #1
2 1413
adam wrote:
After successfull build of ptypes I create a catalog: my_ptypes_test on
ptypes root (like wshare) place there the code of multithreaded server
taken from
http://www.melikyan.com/ptypes/doc/async.examples.html
into file my_ptypes_test.cpp.

Compile command line:

g++ -pthread -D_GNU_SOURCE -DDEBUG -I../include -Wall -O2
../lib/libptypes.a -o my_ptypes_test my_ptypes_test.cpp

brings a 8kb of "undefined reference to"

The output is the same when I remove ../lib/libptypes.a from command
line. But no info about libptypes.a fail to load and the file exist for
sure

please help! thx!


Libs should be last in the g++ command. Any libs not in
the standard locations (/usr/lib, etc) should have their
location specified with a '-L' switch. try something
like this:

g++ -pthread -D_GNU_SOURCE -DDEBUG -I../include -Wall -O2
-o my_ptypes_test my_ptypes_test.cpp -L../lib -lptypes

You may have to use the fully qualified path with the '-L'
switch (e.g. -L/home/me/stuff/lib).

See the gcc/g++ docs for details.

Larry

Jul 23 '05 #2
adam wrote:
After successfull build of ptypes I create a catalog: my_ptypes_test on
ptypes root (like wshare) place there the code of multithreaded server
taken from
http://www.melikyan.com/ptypes/doc/async.examples.html
into file my_ptypes_test.cpp.

Compile command line:

g++ -pthread -D_GNU_SOURCE -DDEBUG -I../include -Wall -O2
../lib/libptypes.a -o my_ptypes_test my_ptypes_test.cpp

brings a 8kb of "undefined reference to"

The output is the same when I remove ../lib/libptypes.a from command
line. But no info about libptypes.a fail to load and the file exist for
sure

please help! thx!


newsgroups for future help:

gnu.gcc.help for C and gcc
gnu.g++.help for C++ and g++
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: konf | last post by:
Hallo, I tried to compile PGSQL 7.4 and I got error (durring make): ar: command not found What is it? Whe I can found it? I have: $ uname -a SunOS ... 5.8 Generic_108528-03 sun4u sparc...
10
by: Sune | last post by:
Hi, previously I used Eclipse CDT for compiling my files just to get started with C and leave C++ behind. Now it's time to get a little more serious so I've moved my files to a new workplace and...
2
by: FireStarter | last post by:
Guys, in the code that follows, why does the method F() still compile, even if DBG is undefined? Inside method G(), the code inside <#if DBG> does not compile (notice that I can write whatever I...
3
by: Dan | last post by:
Hi, I have a problem using an aspx page with a Control on it. I get the following error message Compiler Error Message: CS1595: 'Test.Class2' is defined in multiple places; using definition...
3
by: ktrvnbq02 | last post by:
Hi, We have an ASP.NET application built in Release mode via Visual Studio. All of the C# code is in the code-behind files (i.e. *.aspx.cs files) and there is no C# in the *.aspx files...
6
by: thomson | last post by:
Hi all, I have compiled by .net web applicaion in my local machine , and a dll has been created on the bin Directory, And i have copied the entire application using xcopy deployment to a...
3
by: Robert | last post by:
I have a number of web projects converted from 1.1 to 2.0 in VS2005. I am methodically seeing the error below: The element 'compilation' has invalid child element 'compilers'. List of...
6
by: alban | last post by:
Hello I have got some problems of compilation on a AIX IBM, I use the XLC compilator (And I can't install another one). I try to compile code Pro*c ".pc" (oracle), I need do a pre-compilation...
35
by: mwelsh1118 | last post by:
Why doesn't C# allow incremental compilation like Java? Specifically, in Java I can compile single .java files in isolation. The resulting individual .class files can be grouped into .jar files....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.