I have downloaded the bossa source code from - https://github.com/shumatech/BOSSA/tree/arduino
I installed Cygwin for windows and built the source code from the Cygwin shell by executing the following make command:
make OS=MINGW32_NT-6.1
I get the following error:
In file included from src/WinPortFactory.h:33:0,
from src/WinPortFactory.cpp:29:
src/PortFactory.h:59:2: error: #error "Platform is not supported"
#error "Platform is not supported"
^
Makefile:180: recipe for target 'obj/WinPortFactory.o' failed
make: *** [obj/WinPortFactory.o] Error 1
After inspecting the PortFactory.h file, I see a pre processor directive __WIN32__.
I have tried to include that in my build as follows and get no success:
make OS=MINGW32_NT-6.1 CPPFLAGS=-D__WIN32__
What am I missing? I have CFLAGS and CXXFLAGS as well and get no success.
Related
First, I built the cryptlib (of cryptopp) in Visual Studio Code 2022. And tried a sample c++ program (using files from the library) and it worked fine.
Then, I included the library cryptlib.lib in my OMNeT++ project.
I also included the cryptopp folder for the .cpp and .h files of the library.
But when I build the omnet++ project, I get this error:
03:05:22 **** Incremental Build of configuration debug for project crypto_final ****
make MODE=debug all
cd src && /usr/bin/make
make1: Entering directory '/d/omnetpp-5.7/samples/crypto_final/src'
Server.cc
Creating executable: ../out/clang-debug/src/crypto_final_dbg.exe
lld-link: error: could not open 'liblibcpmt.a': No such file or directory
lld-link: error: could not open 'libLIBCMT.a': No such file or directory
lld-link: error: could not open 'libOLDNAMES.a': No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:99: ../out/clang-debug/src/crypto_final_dbg.exe] Error 1
make[1]: Leaving directory '/d/omnetpp-5.7/samples/crypto_final/src'
make: *** [Makefile:2: all] Error 2
"make MODE=debug all" terminated with exit code 2. Build might be incomplete.
03:05:25 Build Failed. 2 errors, 0 warnings. (took 3s.352ms)
I don't even know what are these libraries or how to get them built.
Can anyone help, please?
Edit #1: btw, when I change the Target type from "Executable" to "Static library (.lib or .a) in makemake options, the project builds normally but does not run properly (has some bugs and no effects can appear on the simulation)
OMNeT++ project uses Makefile, therefore to add an external library or class one should modify makefrag.
You should go to Project | Properties | OMNeT++ | Makemake | select root or src of your project | Options, then Custom | Makefrag and write the following lines:
EXTRA_OBJS += -L/d/foo/lib -llibcpmt -lLIBCMT -lOLDNAMES
CFLAGS += -I/d/foo/include
where /d/foo/lib is an example of the directory which contains your cryptlib static files (e.g. liblibcpmt.a, libLIBCMT.a, ... ), and /d/foo/include - the directory that contains header files of cryptlib.
Omnet++ useses MinGW as the runtime system and the C++ compiler's ABI is incompatible with the MS ABI (i.e. C++ code generated by Visual Studio C++ compiler is incompatible with the code generted by gcc or clang).
You MUST compile your crypto library also with the clang compiler coming with OMNeT++. Visual Studio compiler will NOT work.
Or... OpenSSL libraries and headers are already available in the Windows distro, so you can pt to use that.
I have successfully installed vmmlib 1.7 using the following steps:
Downloaded the files from https://github.com/VMML/vmmlib/tree/1.7
and followed the steps below:
mkdir vmmlib/build
cd vmmlib/build
cmake ..
make
Now, I'm trying to run a program in the test folder "t3_hosvd_test.cpp" , but I'm not able to run it.
I tried to run the Makefile but got the following error:
svd_test.cpp:13:0:
../include/vmmlib/vmmlib.hpp:33:30: fatal error: vmmlib/version.hpp: No such file or directory
compilation terminated.
: recipe for target 'svd_test.o' failed
make: *** [svd_test.o] Error 1
I also tried to run by giving the following command in the terminal:
g++ t3_hosvd_test.cpp -lapack -lvmmlib
but got an error:
t3_hosvd_test.cpp:2:31: fatal error: vmmlib/t3_hosvd.hpp: No such file or directory
compilation terminated.
Can someone help me compile and run this program on Ubuntu 16.04?
When compiling directly, you need to provide the include path via the -I option.
g++ t3_hosvd_test.cpp -I/usr/local/vmmlib17/include -lapack -lvmmlib
Also ensure that your include path is set to vmmlib/include and not vmmlib/include/vmmlib
I have just started to work with QT and am still getting familiar with the compilation process. Currently, I am trying to port an existing QT project to Mac. This app compiles and runs on Linux and Windows.
When I compile the project on Mac OSX 10.8.2 , I am getting this c++11 related error ,
#include ../xxx/pch.h:71:10: fatal error: 'atomic' file not found
#include <atomic>
^
1 error generated.
make[1]: *** [debug/xxx/objective-c++.pch] Error 1
make: *** [debug] Error 2
11:32:01: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project xxx (kit: Qt5.1.0)
When executing step 'Make'
I have included the below flags in the.pro file to enable c++11 ,
QMAKE_CXXFLAGS += -std=c++11
CONFIG += c++11
I am building the project with the pre-built QT5.1Beta package (Clang) which I believe has c++11 enabled.
I see the atomic header in the below locations
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/atomic
and in /usr/lib/c++/v1/atomic
I tried testing by including the complete path ,
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr//lib/c++/v1/atomic
I am getting the below error,
In file included from ../xxx/pch.h:71:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/atomic:535:2:
error: atomic is not implemented
In file included from ../xxx/pch.h:124:
../../../yyy.h:308:12: error: no type named 'atomic' in namespace 'std'
std::atomic<bool> m_signaled;
What am I missing here?
Add also
macx:QMAKE_CXXFLAGS += -stdlib=libc++
macx:QMAKE_LFLAGS += -stdlib=libc++
Maybe it is a bit late, but I fixed it using the -std=gnu++0x flag
ok so i installed CDT for C++ development on my machine. I tried to make it work and followed these instructions to set everything up. By mistake i have gone into the Project>Properties>C++ Build>Enviorement and hit restore defaults by mistake. I dont know if that changed anything but i get the following error when i run my class.
I tried to switch the slashes in the given path "C:\Users\Nathan\workspace\Project\Debug" to forward slashes but that did nothing. I still get the same error. Any hints on what im doing wrong?
19:12:58 **** Incremental Build of configuration Debug for project Project ****
make all
Building file: ../src/Project.cpp
Invoking: Cross G++ Compiler
g++ -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Project.d" -MT"src/Project.d" -o "src/Project.o" "../src/Project.cpp"
cygwin warning:
MS-DOS style path detected: C:\Users\Nathan\workspace\Project\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/Nathan/workspace/Project/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
In file included from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/cwchar:44:0,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/bits/postypes.h:42,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/iosfwd:42,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/ios:39,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/ostream:40,
from /usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/iostream:40,
from ../src/Project.cpp:9:
/usr/lib/gcc/i686-pc-cygwin/4.5.3/include/c++/cstddef:44:20: fatal error: stddef.h: No such file or directory
src/subdir.mk:18: recipe for target `src/Project.o' failed
compilation terminated.
make: *** [src/Project.o] Error 1
19:12:59 Build Finished (took 535ms)
I was trying to get llvm 3.0 on my machine, but I get the following errors when I give make -k.
chethan#ubuntu:~/llvm-3.0$ make
make[1]: Entering directory `/home/chethan/llvm-3.0/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
#include <utility>
^
1 error generated.
make[1]: *** [/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o] Error 1
make[1]: Leaving directory `/home/chethan/llvm-3.0/lib/Support'
make: *** [all] Error 1
I follow these steps to build llvm on my machine.
Get the llvm source zip file from llvm download page and unzipped to folder llvm-3.0
cd /home/chethan/llvm-3.0
./configure
make -k
Although in this case, I just gave 'make' so that it stops on first error. I have llvm-gcc 4.2 installed on my machine.
I followed the same steps today morning in my home machine, and llvm-3.0 built successfully! Any idea what might be missing here?
configure with CC=gcc CXX=g++. It looks like the configure script is finding a version of clang that isn't actually set up correctly to compile C++ code.