473,322 Members | 1,307 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,322 software developers and data experts.

Opt++ Configuration

Hi,

I'd like to use Opt++ but I'm not very experienced in using C++. I work with Windows7, Eclipse and CDT and installed the library using cygwin. Includes for the compiler and libraries for the linker are set.

Auto-completion for all headers works well in Eclipse, so I think everything is configured right. My first experiments resulted in a bunch of errors, mainly regarding namespaces. Following the documentation I set the compiler options -DHAVE_NAMESPACES and -DHAVE_STD. This eliminated most errors, but in fact I don't really know what I'm doing. I could live with that, but unfortunately there's one error left:


**** Build of configuration Debug for project MyCPP ****

**** Internal Builder is used for build ****
g++ -IC:\cod\cygwin\lib\optpp24\include -O0 -g3 -Wall -c -fmessage-length=0 -DHAVE_NAMESPACES -DHAVE_STD -o src\MyOptPP1.o ..\src\MyOptPP1.cpp
g++ -LC:\cod\cygwin\lib\optpp24\lib -o MyCPP.exe src\MyOptPP1.o
src\MyOptPP1.o: In function `_static_initialization_and_destruction_0':
C:/cod/cygwin/lib/optpp24/include/myexcept.h:172: undefined reference to `RBD_COMMON::JanitorInitializer::JanitorInitialize r()'
collect2: ld returned 1 exit status
Build error occurred, build is stopped
Time consumed: 700 ms.


Does anyone have an idea what might be the reason for the error?

Thanks
Nico
Oct 25 '12 #1
3 3064
weaknessforcats
9,208 Expert Mod 8TB
In the header myexcept.h at line 172 there is a reference to RBD_COMMON::JanitorInitializer::JanitorInitialize r() which has not yet been declared. The error occurred while compiling the function _static_initialization_and_destruction_0.

I would look in the .c file containing the function and be sure you have not missed including a file before the include of myexcept.h that contains the necessary reference.
Oct 25 '12 #2
Thanks for your response. myexcept.h is a header file of the library Opt++. Since this library is used by others, I'm pretty sure that this file and all other files are correct. In fact my test file constains only a main-method printing a 'Hello World'. It works well until I include certain but very basic header files of Opt++. Any other ideas? Could it be, that I did something wrong when installing the library? I'm not very familiar with the 'configure - make - make install' approach.
Oct 26 '12 #3
weaknessforcats
9,208 Expert Mod 8TB
Are you certain that all your build flags are set correctly? These are usually #define which are tested in the headerd with #ifndef-type macros.

Are you missing any "using" declarations, like "usng namespace ..."?

The fact the library works under some conditions leads me to beieve that it is correctly installed but that the file containing _static_initialization_and_destruction_0 is not correctly set up.

I'm not a gnu user so the error file is hard to read but it may be a link error rther than a compile error and that wuld mean yuo are missing a .c file in your build or have failed to include a library.
Oct 26 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Debian User | last post by:
Hi all, I discovered that php4 4.3.4 does no longer support opt -q (at least on Debian sarge). I had *many* cgi scripts run under webmin that relayed on that option. Why that? In sarge...
1
by: Cherrish Vaidiyan | last post by:
Hello, Can anyone help me with configuring listener of Oracle 9i DB in Red Hat Linux 9.I have installed 2 database in a single system. I am using the default port of 1521 for 1 listener and 1...
0
by: Luke | last post by:
At the end of Oracle 9i installation, the Agent Configuration Assistant failed with Parameter"orahome"=/opt/oracle/product/9.2.0 Parameter"nodeinfo"=NO_VALUE I'm installing Oracle 9i on a...
3
by: Steve McLellan | last post by:
Hi, Sorry for the long post, it's a bit epic (and sums up the last 10 hours of my life, apart from my car's gearbox melting). We've got a mixed C++ assembly that's exhibiting odd behaviour...
0
by: frankgerlach | last post by:
When trying to run the sample web services of the mono distribution (file /opt/mono-1.1.10/lib/xsp/test/1.1/webservice/TestService.asmx), I get the following error message in my web browser: ...
2
by: johnny | last post by:
hi all, I have made a script to register contacts in a database with the double opt-in system. Anyway, when looking for some examples, I have found the following script which uses a md5 hash...
13
by: alex | last post by:
Hi, I've got a php script located at : http://localhost/browse/script.php This script is "URL-rewrited" as http://localhost/welcome.htm This script includes other scripts with the following...
3
by: robert | last post by:
I'm looking for a most simple but save opt-in mailing list script in php (linux Apache CGI, but shouldn't matter) best: * all in one single .php file; different functions by input vars /...
2
by: Dark Wind | last post by:
Hi, I have been using OPT++ to solve a non linear programming problem. I am totally new to C++, but I looked at an example given on OPT++ website and modified it according to my problem. But I...
2
by: Fresh | last post by:
Hi, I met a problem, when I change warning level to 4 and to track warning as error, then a link warning show "warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification" I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.