|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
when i compile a cpp file using microsoft cl (version 13.10.3077) ,
error occurs: singleton.h : fatal error LNK1106: invalid file or disk full: cannot seek to 0x6D75 the command line is : cl test.cpp singleton.h -o test.exe but ,when i using g++ on linux system , it's ok. the command line is : g++ test.cpp singleton.h -o test the file : //test.cpp #include "singleton.h" int main(void) { Singleton s; s.instance()->fun(); s.instance()->fun(); return 0; } //singleton.h #include <iostream> using namespace std; class Singleton { public: Singleton() { } static Singleton* instance() { static Singleton* instance_; if(!instance_) instance_=new Singleton(); return instance_; } void fun(){cout<<"instance call"<<endl;} }; any one who me out , what the correct cl command is ? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
marsarden a ¨¦crit :
> when i compile a cpp file using microsoft cl (version 13.10.3077) , > error occurs: > > singleton.h : fatal error LNK1106: invalid file or disk full: cannot > seek to 0x6D75 > > the command line is : cl test.cpp singleton.h -o test.exe > > but ,when i using g++ on linux system , it's ok. the command line is : > > g++ test.cpp singleton.h -o test I guess cl is more fashion than gcc. Singleton hunt is open ! > any one who me out , what the correct cl command is ? Search 'compiling a C++ program' on: http://msdn2.microsoft.com/ This is a c++ group not an ms one. Michael |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
if this wasn't obvious this is not a c++ question per se... but
anyways here is the official discussion and resoluiton for the issue http://support.microsoft.com/kb/834332 |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 10 15 , 3 43 , ravinder thakur <ravindertha...@gmail.com> wrote:
> if this wasn't obvious this is not a c++ question per se... but > anyways here is the official discussion and resoluiton for the issuehttp://support.microsoft.com/kb/834332 thks alot! |
|
![]() |
| Outils de la discussion | |
|
|