From today afternoon I am trying to setup C/C++(cygwin gcc/g++) compiler for Eclipse Helios in Windows 7 inorder to run OpenGL applications in Eclipse(I have already configured Visual Studio 2008 for running OpenGL applications and programs are also running in it), but I'm unable to run a small C program successfully in Eclipse. Till now I have added gcc/g++ include files and some library files in project properties under C/C++ general->paths and symbols
They are:
Includes
C:\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include,
C:\cygwin\usr\include,
C:\cygwin\usr\include\w32api,
C:\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\include\c++\backward
Libraries
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\GlU32.Lib,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\glut32.Lib,
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\opengl32.Lib
Library path
C:\cygwin\lib\w32api
After including all these and with successfully building the program, I'm unable to run the program, which gives me an error
"make: * No rule to make target
`all'. Stop."
How should i solve this problem?
Related
For a while I have been editing my Rust program with Pycharm Professional. However, I was curious and experimented with VS Code. At first my project was compiling and running. However, it suddenly started throwing a pretty wild error on cargo build and cargo run (while cargo check is fine), even in cmd outside of VS Code:
error: linking with `link.exe` failed: exit code: 1104
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\rust\\book\\target\\debug\\deps\\book.1apvyby1qhuehv3.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1cw7xmk0cjjg5uln.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1e8ho0j4rykowhcr.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1g2fbveo2gp7bxds.rcgu.o"
..............
..............
= note: LINK : fatal error LNK1104: cannot open file 'C:\rust\book\target\debug\deps\book.exe'
book is the name of my project.
I am on Windows 10, System Type: x64-based PC.
VS Code version 1.63.2
Sometimes VSCode file watcher watches the files in target/, that is not good.
So open the Settings, search for exclude, and in all "list-like" cofigurations add **/target/**, do a cargo clean and restart VSCode. This should fix this and future problems
Had to remove the directory, and redownload the whole project(used Git).
I'm trying to build Qbs example collidingmice on Windows 10 x64 and got the following error message:
Qt5Cored.lib(Qt5Cored.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
I tried setting the following in the collidingmice.qbs
qbs.architecture : "x64"
and got the message
'x64' differs from the architecture produced by this compiler (x86)
I then tried
qbs.architecture : "x86_64"
which gives the error message;
'x86_64' differs from the architecture produced by this compiler (x86)
I then tried
qbs.architecture : "x86"
which gives the error message;
Qt5Cored.lib(Qt5Cored.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'x86'
Is there a way to set target machine type e.g. to 'x86' or 'x64' in Qbs?
My guess is that you are using an x86 compiler and an x64 Qt, which will not work. How did you set up your profile?
Here's how I fixed the same issue when building an application using the Qbs build system ("Tiled", the game tilemap editor). In my case I am using the Visual Studio 2019 x64 toolchain.
NOTE: This answer assumes that Qt and Qbs are in your PATH.
Open the command prompt
Run "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 to initialize VS2019 environment variables in your command prompt.
cd to the directory where your .qbs project lives.
cd myproject
Create a new shadow build directory for your build and cd into it.
mkdir build-myproject
cd build-myproject
run qbs setup-toolchains --detect which should find your VS2019 environments.
run qbs setup-qt --detect which should find your Qt environment (assuming you added to PATH).
run qbs config --list profiles to show the detected toolchain profiles.
Example:
qbs config --list profiles
profiles.MSVC2019-x64.cpp.compilerVersion: "19.25.28614"
profiles.MSVC2019-x64.cpp.toolchainInstallPath: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64"
profiles.MSVC2019-x64.qbs.architecture: "x86_64"
profiles.MSVC2019-x64.qbs.targetPlatform: "windows"
profiles.MSVC2019-x64.qbs.toolchainType: "msvc"
...
The MSVC2019 x64 profile is named "MSVC2019-x64". Now specify that via qbs property when building your application like so:
qbs build -f ..\MyAwesomeProject.qbs profile:MSVC2019-x64
Building as x86 can be accomplished in a similar manner, as long as an x86 build of Qt is available. Running the vcvarsall.bat batch file with x86 will set up your command prompt to use the VS x86 environment variables.
this is the session of building exe file in matlab 7.1.
I think I have a problem with the compiler.
mbuild -setup
Please choose your compiler for building standalone MATLAB
applications: Would you like mbuild to locate installed compilers
[y]/n? y
Select a compiler:
[1] Microsoft Visual C++ 2008 Express in C:\Program Files (x86)\Microsoft Visual Studio 9.0
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 Express
Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0
Are these correct [y]/n? y
*****************************************************************************
Error: Could not find the 64-bit compiler. This may indicate that the
"X64 Compilers and Tools" or the Microsoft Windows Software
Development Kit (SDK) is not installed. To build 64-bit binaries,
Microsoft Visual C++ 2008 Express Edition requires that these two
packages be properly installed.
*****************************************************************************
Trying to update options file: C:\Users\****\AppData\Roaming\MathWorks\MATLAB\R2010a\compopts.bat
From template: C:\PROGRA~1\MATLAB\R2010a\bin\win64\mbuildopts\msvc90freecompp.bat
Done . . .
>> mcc -m mainmain.m -o mainmain
Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable (specify the -v option for more information).
??? Error using ==> mcc
Error executing mcc, return status = 1 (0x1).
if the problem is with the compiler, how can I install another compiler?
I have windows 7 (64 bits) and I want that the exe file will work on windows operating system.
This is probably the result of one of two issues.
1) You don't have the Windows SDK installed (as indicated in the error message). According to this MathWorks page regarding supported compilers
Both Microsoft Visual Studio 2008 and Windows Software Development Kit (SDK) 6.1 must be installed. When installing Microsoft Visual Studio, you must choose "X64 Compilers and Tools" when installing Microsoft Visual Studio; this is not selected by default.
Now, keep in mind, this reference is for the most recent release of MATLAB, but I'm betting that this information is still relevant to your issue.
You can download the SDK here.
2) It's also possible that the compiler that you're using simply isn't supported for your release of MATLAB. See here for info on supported compilers for MATLAB 7.1.
I intend to work with OpenCV 1.1 version and Matlab2011 together. The program uses call to load library. However, it returns an error
> In loadlibrary at 347
In Untitled at 4
Error using loadlibrary (line 421)
There was an error loading the library "C:\Program Files
(x86)\OpenCV1.1\bin\cxcore110.dll"
C:\Program Files (x86)\OpenCV1.1\bin\cxcore110.dll is not a valid
Win32 application.
I have tested the program in Matlab 2008 and 2010 where it gives error of a different kind I have installed x64 Compilers and Tools and my system has Visual Studio2008 and 2010 with SDK7 and 6.1. Also, on doing MEX setup I get the following options
Select a compiler:
[1] Microsoft Software Development Kit (SDK) 7.1 in c:\Program Files (x86)\Microsoft Visual Studio 10.0
[2] Microsoft Visual C++ 2010 Express in c:\Program Files (x86)\Microsoft Visual Studio 10.0
[0] None
Compiler: 2
This also returns the error
Error in ==> untitled at 5
loadlibrary(...
I am perplexed at what to do as this problem is persistently appearing. I even followed the thread in link where tit mentions that 2011 supports load library. So,why does it not work?Please help.
Applications compiled for 32bits don't mix with applications compiled for 64bits. If your OpenCV was compiled for 32bits, make sure Matlab is 32bits as well as your compilers.
BTW, seriously consider moving to a more recent version. OpenCV 1.1 is jurassic!
I have an error in NetBeans(mobile business application)
I have installed JDK (latest version jdk1.6.0_21)
After this I had an error:
Cannot run program "C:\Program Files (x86)\Java\jre6\bin\javac.exe": CreateProcess error=2, The system cannot find the file specified
BUILD FAILED (total time: 1 second)
Then in "Advanced system settings"->Environment variables
I added a new line in "system variables" - "JAVA_HOME" ,value - C:\Program Files\Java\jdk1.6.0_21 (my path to JDK)
Then i had "unknown error"
See in the screen..->
http://img693.imageshack.us/img693/6423/screencc.png' border='0' width="300px" height="300px"> or url http://img693.imageshack.us/img693/6423/screencc.png
Thanks for the answers!
I think this is specific to your machine setup. javac is the Java compiler, but it's looking for it inside C:\Program Files (x86)\Java\jre6\ instead of C:\Program Files (x86)\Java\jdk1.6.0_21\.
Let's try to dig through this:
Did you uninstall your previous JDK after you installed JDK6u21?
Did you uninstall your JRE?
What OS are you running? Windows 7 64?
Go to your Add/Remove Programs. You need the following entries:
What do you have in your C:\Program Files (x86)\Java\?
AFAIK, you have to install both the 32-bit and 64-bit version of the JDK.