I have scoured google for a solution to fix this (including several posts here on c++ 11 features not working) and I can't find a solution. I have grown attached to netbeans in past year, using it for all my computer science courses. But it is slightly bothersome that some features of C++ are limited in my IDE, especially when they are features my professor is using to teach C++. When I use stoi() in any way I get an "Unable to resolve identifier" error. Is there a hot fix of sorts to get netbeans to acquire these features?
I've worked around it for my first programming assignment, but since I'm just now learning C++ I'd like to follow my professor's lead at the moment without doing anything extraneous.
I have tried the accepted solution here: How to use C++11 std::stoi with gcc?, and here: Netbeans C/C++ 7.2 -std=C++11 not recognized by gcc v4.6 or lower and I still get errors. And just as a disclaimer, to my knowledge I am using the listed includes involved here. So if anyone has a solution I'd appreciate it quite much.
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/Zachary/Documents/NetBeansProjects/CS_240_HW01'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin_4.x-Windows/cs_240_hw01.exe
make[2]: Entering directory '/cygdrive/c/Users/Zachary/Documents/NetBeansProjects/CS_240_HW01'
mkdir -p build/Debug/Cygwin_4.x-Windows
rm -f "build/Debug/Cygwin_4.x-Windows/main.o.d"
g++ -std=c++0x -c -g -std=c++11 -MMD -MP -MF "build/Debug/Cygwin_4.x-Windows/main.o.d" -o build/Debug/Cygwin_4.x-Windows/main.o main.cpp
main.cpp: In function 'int main(int, char**)':
main.cpp:24:26: error: 'stoi' was not declared in this scope
int myint = stoi(test);
^
nbproject/Makefile-Debug.mk:84: recipe for target 'build/Debug/Cygwin_4.x-Windows/main.o' failed
make[2]: *** [build/Debug/Cygwin_4.x-Windows/main.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/Zachary/Documents/NetBeansProjects/CS_240_HW01'
nbproject/Makefile-Debug.mk:62: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/Zachary/Documents/NetBeansProjects/CS_240_HW01'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
EDIT: Added Build output
Related
I'm trying to build an application with Netbeans and getting the following error:
/usr/bin/ld: cannot find -lmysqlpp
I believe this exists as per the below screen shots;
and here in my includes from Netbeans;
The below is the full output from Netbeans;
cd '/media/psf/DL/DL_src/FEC_src/docugirl'
/usr/bin/make -f Makefile CONF=Debug
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/media/psf/DL/DL_src/FEC_src/docugirl'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk /app/bin/docugirl
make[2]: Entering directory '/media/psf/DL/DL_src/FEC_src/docugirl'
mkdir -p /app/bin
g++ -o /app/bin/docugirl build/Debug/GNU-Linux/docugirl.o -lm -lpthread /pcli/library/libcore.a /pcli/library/libsdd.a -lmysqlpp
/usr/bin/ld: cannot find -lmysqlpp
collect2: error: ld returned 1 exit status
make[2]: *** [nbproject/Makefile-Debug.mk:67: /app/bin/docugirl] Error 1
make[2]: Leaving directory '/media/psf/DL/DL_src/FEC_src/docugirl'
make[1]: *** [nbproject/Makefile-Debug.mk:59: .build-conf] Error 2
make[1]: Leaving directory '/media/psf/DL/DL_src/FEC_src/docugirl'
make: *** [nbproject/Makefile-impl.mk:40: .build-impl] Error 2
BUILD FAILED (exit value 2, total time: 472ms)
For completeness, the source exists on a remote Debian server (as has previous successfully created and built mysql type applications).
So, I'm a little confused, I thought and assumed that I had the necessary mysql stuff in order to build this, I am able to build other mysql applications with this setup. Is this mysqlpp different/additional to the /usr/include/mysql and /usr/include/mysql++?
The /usr/include/mysql links to /usr/include/mariadb
Any help would be greatly appreciated here, thanks in advance...
#HEKTO This was indeed the problem but it seemed that the current release of Debian (10.5) did not include the libmysql++-dev package, the reasons for which are as yet unknown to me and although I had copied the mysql++ header files across, the libmysqlpp.so was indeed not there. In this instance, I resorted to using a previous release, although I believe the next release will include this.
See here: https://packages.debian.org/stretch/libmysql++-dev
Can someone help me, Im having problem in compiling FingerJetFXOSE in Cygwin 32
gcc version 5.4.0 (GCC)
I used the following command:
$ make -f Makefile
make -C src/libFRFXLL
make[1]: Entering directory '/home/src/FingerJetFXOSE-master/src/libFRFXLL'
make -C src/libFRFXLL
make[2]: Entering directory '/home/src/FingerJetFXOSE- master/src/libFRFXLL/src/libFRFXLL'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/src/FingerJetFXOSE-master/src/libFRFXLL/src/libFRFXLL'
make[1]: Leaving directory '/home/src/FingerJetFXOSE-master/src/libFRFXLL'
make -C src/libfjfx
make[1]: Entering directory '/home/src/FingerJetFXOSE-master/src/libfjfx'
g++ -O2 -Wl,--strip-all -I../../include -I../libFRFXLL/include -fno- exceptions-fno-rtti -fno-stack-protector -fPIC -shared -nodefaultlibs -Wl,--version-script
I got this error at the end:
../libFRFXLL/lib/libFRFXLL.a(FRFXLLCreateFeatureSetInPlaceFromRaw.o):FRFXLLCreat
eFeatureSetInPlaceFromRaw.cpp:(.text$_ZN14FingerJetFxOSE15FpRecEngineImpl20Featu
reExtractionObjINS0_8Embedded24FeatureExtractionInPlaceEE16CreateFeatureSetIhEEi
PT_jjjjjPPv[__ZN14FingerJetFxOSE15FpRecEngineImpl20FeatureExtractionObjINS0_8Emb
edded24FeatureExtractionInPlaceEE16CreateFeatureSetIhEEiPT_jjjjjPPv]+0x159c): un
defined reference to `memmove'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:62: ../../lib/libfjfx.so.5.2.0] Error 1
make[1]: Leaving directory '/home/usr/FingerJetFXOSE-master/src/libfjfx'
make: *** [Makefile:50: src/libfjfx] Error 2
Thanks
I looked at the makefiles for the FingerJetFXOSE project here:
https://github.com/FingerJetFXOSE/FingerJetFXOSE
The makefiles do not support Cygwin. The README says that Windows is supported, but I suspect they mean a Visual-Studio-based build after a manual source import.
I think you either have to compile on GNU/Linux, or compile this code without the upstream makefiles.
I am trying to build apache thrift from source. After executing ./configure (which doesn't give any errors). However, when I execute make I get the following error:
/bin/bash ../../../libtool --tag=CXX --mode=link g++ -Wall -g -O2 -L/usr/lib -o Benchmark Benchmark.o libtestgencpp.la -lssl -lcrypto -lrt -lpthread
libtool: link: cannot find the library `RPC/thrift-0.9.1/lib/cpp/libthrift.la' or unhandled argument `RPC/thrift-0.9.1/lib/cpp/libthrift.la'
make[4]: *** [Benchmark] Error 1
make[4]: Leaving directory `/home/user/Documents/thrift-0.9.1/lib/cpp/test'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/user/Documents/thrift-0.9.1/lib/cpp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/user/Documents/thrift-0.9.1/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/user/Documents/thrift-0.9.1'
make: *** [all] Error 2
Does anyone have any idea why this error occurs and how do I fix it?
Have you resolved this? I am currently successfully building the tarball of 0.93 on Ubuntu trusty (14.04) on x86 and arm architectures.
I would suggest trying the 0.93 tarball, and using cmake instead of ./configure (as that's worked better for me). Your mileage may vary, of course.
i have a litle problem using Netbeans 7.4 and Cygwin 4.x for compiling my C++ programms. I've done everything as in netbeans tutorial. I've installed gcc, gdb, g++ and make compilers. Everything is setup properly in Netbeans properties, every path. But i still get the same problem, i don't know what is this problem. I'm trying to compile Hello sample from Netbeans. Please help me. Here is the error log:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory '/cygdrive/c/Users/Dragosh/Documents/NetBeansProjects/Welcome_2'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/Cygwin_4.x-Windows/welcome_2.exe
make[2]: Entering directory '/cygdrive/c/Users/Dragosh/Documents/NetBeansProjects/Welcome_2'
mkdir -p build/Debug/Cygwin_4.x-Windows
g++ -c -g -o build/Debug/Cygwin_4.x-Windows/welcome.o welcome.cc
In file included from /usr/include/sys/reent.h:14:0,
from /usr/include/wchar.h:6,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/cwchar:44,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/bits/postypes.h:40,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/iosfwd:40,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/ios:38,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/iostream:39,
from welcome.cc:31:
/usr/include/sys/_types.h:72:20: fatal error: stddef.h: No such file or directory
#include <stddef.h>
^
compilation terminated.
nbproject/Makefile-Debug.mk:66: recipe for target 'build/Debug/Cygwin_4.x-Windows/welcome.o' failed
make[2]: *** [build/Debug/Cygwin_4.x-Windows/welcome.o] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/Dragosh/Documents/NetBeansProjects/Welcome_2'
nbproject/Makefile-Debug.mk:59: recipe for target '.build-conf' failed
make[1]: *** [.build-conf] Error 2
make[1]: Leaving directory '/cygdrive/c/Users/Dragosh/Documents/NetBeansProjects/Welcome_2'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 467ms)
Got this issue with cygwin too, after last update to 2.830 (see setup.exe version). I am using 64 bit version. To verify that we have the same issue, try manualy compiling something supersimple with g++ usgin cygwin terminal.
I checked with:
$ echo -e "#include <iostream>\n int main() { return 0; }" | g++ -xc++ -
And got:
In file included from /usr/include/sys/reent.h:14:0,
from /usr/include/wchar.h:6,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/cwchar:44,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/bits/postypes.h:40,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/iosfwd:40,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/ios:38,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/ostream:38,
from /usr/lib/gcc/x86_64-pc-cygwin/4.8.1/include/c++/iostream:39,
from <stdin>:1:
/usr/include/sys/_types.h:72:20: fatal error: stddef.h: No such file or directory
#include <stddef.h>
^
compilation terminated.
I noticed that there are two folders of gcc here
C:\cygwin\lib\gcc\x86_64-pc-cygwin\4.8.1
C:\cygwin\lib\gcc\x86_64-pc-cygwin\4.8.2
and g++ --version gives 4.8.2
Running Cygwin's latest Setup.exe and looking for installed packets showed that versions mismatch for gcc-core and gcc-g++ :
gcc-core = 4.8.2-1
gcc-c++ = 4.8.1-3
I downgraded gcc-core to 4.8.1-3 and fixed the issue.
I'm a total c++ Newbie.
I'm trying to build windows aplications with Wx-Widgets under Net Beans.
So far so good. I have instaled everything, configured, build wx-widgets and attached it to the new project - with help of a good man here: Can't make wx-widget work with net-beans.
Now I try to build my first app:
#include <wx/string.h>
int main(int argc, char **argv)
{
wxPuts(wxT("A wxWidgets console application"));
}
and this is what I get:
I'm not sure if this is readable so I paste the errors:
g++ `C:\WXWIN\wx-config --cxxflags` -c -g -I../../../WXWIN/include `C:\WXWIN\wx-config --cxxflags` -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
/bin/sh.exe: C:WXWINwx-config: command not found
/bin/sh.exe: C:WXWINwx-config: command not found
In file included from ../../../WXWIN/include/wx/defs.h:21:0,
from ../../../WXWIN/include/wx/string.h:25,
from main.cpp:1:
../../../WXWIN/include/wx/platform.h:196:22: fatal error: wx/setup.h: No such file or directory
compilation terminated.
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
make[2]: Leaving directory `/c/xampp/htdocs/WxWwigets_tutorial'
make[1]: Leaving directory `/c/xampp/htdocs/WxWwigets_tutorial'
BUILD FAILED (exit value 2, total time: 859ms)
Please notice that I have set everything in linker and compiler like ordered: http://wiki.wxwidgets.org/Compiling_using_Netbeans
The error is right in front of you: "command not found". If you use /bin/sh, you must use Unix style paths, e.g. C:/WXWIN/wx-config instead of DOS paths with the backslashes.
I seriously advise you to get familiar with the environment you're using instead of just following the Wiki instructions without understanding them, otherwise your problems won't be over any time soon.