473,836 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cygwin g++ Mulitiple Definitions of std::min()

I've googled this problem and can't seem to find an answer.

I get the error below when linking an executable which I am trying to
port from Linux to Cygwin/XP. I'm not sure how to attack this...any
thoughts? Do I possibly need to use some different g++ options when
linking/compiling on cygwin

-------------------- link error ---------------------
g++ -lpthread -g stilverify.o libstil.so -o stilverify
libstil.so: In function `_ZSt3minIjERKT _S2_S2_':
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_algobase.h: 151:
multiple definition of `unsigned int const& std::min<unsign ed
int>(unsigned int const&, unsigned int const&)'
stilverify.o:/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/locale_facets.t cc:2497:
first defined here
collect2: ld returned 1 exit status
make: *** [stilverify] Error 1

------------------------------- g++ version -----------------------

$ g++ -v
Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose
--prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada ,c++,d,f77,java ,objc --enable-nls
--without-included-gettext --enable-version-specific-runtime-libs
--without-x --enable-libgcj --disable-java-awt --with-system-zlib
--enable-interpreter --disable-libgcj-debug --enable-threads=posix
--enable-java-gc=boehm --disable-win32-registry
--enable-sjlj-exceptions --enable-hash-synchronization
--enable-libstdcxx-debug : (reconfigured)
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)

Aug 26 '06 #1
1 4422
do************@ gmail.com wrote:
I've googled this problem and can't seem to find an answer.

I get the error below when linking an executable which I am trying to
port from Linux to Cygwin/XP.
You might consider posting to 'gnu.g++.help' or to the Windows newsgroup.
I'm not sure how to attack this...any
thoughts? Do I possibly need to use some different g++ options when
linking/compiling on cygwin
We can't help you with options. We don't discuss how to use tools,
how to do things in the langauge.
Link errors are implementation-specific and solutions for them are
implemenation specific as well. If you have too many definitions of
your function (more than one), the linker tells you. To correct that
you usually remove extraneous definitions.

Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 26 '06 #2

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

Similar topics

by: Thomas J. Clancy | last post by:
I was wondering if anyone knew of a way to use std::copy() and istream_iterator<>/ostream_iterator<> write a file copy function that is quick and efficient. Doing this messes up the file because it seems to ignore '\n' ifstream in("somefile"); ofstream out("someOtherFile"); std::copy(std::istream_iterator<unsigned char>(in),
by: goberle | last post by:
I have installed the Cygwin package under WinXP. I am trying to insure that I have a reasonable development environment, and that things are working properly, by trying to compile and run the following classic program. $ cat hellow.cpp #include <iostream> int main (int argc, char *argv) { cout << "Hello, world" << endl;
by: PengYu.UT | last post by:
Hi, Would you please let me know where max and min int are defined in C++? Best wishes, Peng
by: Haro Panosyan | last post by:
How to construct a bitset from string? For example: std::bitset<16> b16("1011011110001011"); Is this possible? Thanks in advance. -haro
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo widget, but for some reason the text is invisible on cygwin). After I close the Toplevel widget, all of the menus in my app behave as though they have no contents to them, i..e I can press on the File menu button, and see it depress, but the Exit...
by: Gary Wessle | last post by:
Hi often I need to read numbers and only keep the highest or lowest. so I do something like int uLimit = 0; int lLimit = 999999999999; //hoping the compiler will not complain uLimit = val_read uLimit ? val_read : uLimit; lLimit = val_read < lLimit ? val_read : lLimit;
by: TBass | last post by:
Hi. I wrote a "tag" class to store values. The user gets to store most any type he would need. Instead of getting too complicatated, I decided I would store the value as a stringstream, then overload the SetValue method. .... protected:
by: Adem24 | last post by:
What is the best way to get the minimum value and the maximum value an integral POD can hold without using any external definitions like INT_MIN, INT_MAX etc.? The type (short, int, long, etc.) plus signed/unsigned is known.
by: Peng Yu | last post by:
Hi, I'm wondering if there is a min function (in boost, maybe?) that accepts any number of arguments? std::min only accepts two arguments. If I want to get the minimum number out of many, I have use std::min many times, which is not convenient. Thanks, Peng
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.