本文介绍了CX-Post:你好世界的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 限时删除!! 我一定不能在这里抓到任何东西。 只是一个简单的应用程序,如下(任何第一个程序都是......) ---- #include< iostream.h> int main(){ cout< ;<" hello world"; 返回0; } ---- 永远不会编译!在FreeBSD,OpenBSD,Windows(在Visual C ++下用于控制台应用程序),OS X开发人员工具上试用。他们都在抱怨! 也是一样的原因! /tmp/ccJ31810.o:功能'main'': /tmp/ccJ31810.o(.text+0xf):未定义引用`cout'' /tmp/ccJ31810.o(.text+0x14):未定义引用 ` ostream :: operator<<(char const *)'' collect2:ld返回1退出状态 但是......我认为#include应该在检查代码执行问题之前从 该文件中引入定义。 我不明白为什么它赢了'不管怎样,无论我看到什么教程,我读书的书都是b ,我读过的文章!有人能指出我正确的方向,一个完全无能为力的新手! (是的,我打电话给自己,所以你可以打电话给我 也是ONCE!) 提前感谢它,电子邮件被垃圾邮件拦截,删除单个期间 在@符号前面通过邮件回复。 --TimI must not be grasping anything here.Just a simple application, as follows (as any first-program is...)----#include <iostream.h>int main() {cout <<"hello world";return 0;}----never compiles! Tried it on FreeBSD, OpenBSD, Windows (under Visual C++ forConsole App), OS X developer tools. THEY ALL complain!pretty much the same reason too!/tmp/ccJ31810.o: In function `main'':/tmp/ccJ31810.o(.text+0xf): undefined reference to `cout''/tmp/ccJ31810.o(.text+0x14): undefined reference to`ostream::operator<<(char const *)''collect2: ld returned 1 exit statusBut... I thought the #include was supposed to bring in the definitions fromthat file before checking the code for execution problems.I don''t understand why it won''t work, no matter the tutorials I see, books Iread, articles I read! Can someone point me in the right direction, autterly clueless newbie! (yes, I called myself that, so you can call methat ONCE, too!)Appreciate it in advance, email is spam-blocked, remove the single periodPRIOR to the @ sign to reply by mail.--Tim推荐答案 这篇关于CX-Post:你好世界的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-06 10:29