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

std::cout doesn't work in windows qt app

i'm getting an error :
g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -Wl,-subsystem,console -mthreads -Wl -o "release\doba8.exe"
release\ma
in.o release\myqtapp.o release\moc_myqtapp.o -L"c:\Qt\4.3.0\lib"
-lQtGui4 -lQtC
ore4
/mingw/lib/libmingw32.a(main.o):main.c:(.text+0x104): undefined
reference to `Wi
nMain@16'
collect2: ld returned 1 exit status

when i try to compile otherwise fully working app. i added CONFIG +=
console to my project file. sorry if it is a bit off-topic
Aug 15 '07 #1
1 5826
Milan Krejci wrote:
i'm getting an error :
g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-rel
oc -Wl,-s -Wl,-subsystem,console -mthreads -Wl -o "release\doba8.exe"
release\ma
in.o release\myqtapp.o release\moc_myqtapp.o -L"c:\Qt\4.3.0\lib"
-lQtGui4 -lQtC
ore4
/mingw/lib/libmingw32.a(main.o):main.c:(.text+0x104): undefined
reference to `Wi
nMain@16'
collect2: ld returned 1 exit status

when i try to compile otherwise fully working app. i added CONFIG +=
console to my project file. sorry if it is a bit off-topic
It is off-topic because it pertains to Windows and Qt programming,
and not to C++ language itself. Try a Windows programming newsgroup.
I don't know how active is 'comp.os.ms-windows.programmer' nowadays,
if it isn't, find the appropriate one from 'microsoft.public.*'
hierarchy or ask in a Qt online forum.

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

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

Similar topics

12
by: Minti | last post by:
Is std::cout slower than printf When we call printf e.g. in printf(20 format conversion specifications, 20 arguments); Is it faster than the std::cout << { 20 redirections to the output...
6
by: clilley | last post by:
The following code causes a segmentation fault on DEC Tru64: foo.cc (built into libFoo.so) //--------------------------- include <iostream> bool createFoo() { std::cout << "createFoo" <<...
6
by: nish.parikh | last post by:
Hi, I am using std::cout to print a char pointer that is NULL. Subsequent calls to std::cout dont print anything. Is this the expected behavior? example: #include <iostream> int main( int...
1
by: zhege | last post by:
I am a beginner of C++; I have a question about the std:string and std:cout class; Two pieces of code: -------------------------------- #include <iostream> #include <string> using namespace...
3
by: Jim Langston | last post by:
I have a computer game that has no console. If I want to output something I push a string to the back of a std::vector<std::stringand that gets output and maintained. All is well and good, but...
7
by: imutate | last post by:
How do I implement << ala std::cout for vector template ? I already have the following: #include <vector> template < typename T > class Vec : public std::vector< T { public: Vec() { } Vec(...
19
by: Dancefire | last post by:
Hi, everyone It might be a simple question, but I really don't know the answer. char c = '1'; cout << c; The above code will only output a '1' rather than 0x31; If I use int cast, it can...
6
by: Roger | last post by:
Hello, I'm pretty new to C++ programming, and I'm teaching myself the language using various sources. This sounds stupid, but I am really confused on this... I was wondering why we have to write...
11
by: Adrian | last post by:
Is it possible to save a copy of cout the same way you can save a copy of stdout in C (I know C version is portable, but unix portable is good enough for me). I have to use a library which...
58
by: Mark Casternoff | last post by:
I'm getting back into C++ after a long hiatus (they didn't have namespaces back then). I know this question is completely subjective, but I'd be interested in hearing which is the "better"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
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,...
0
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...
0
agi2029
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,...

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.