Click here to Skip to main content
16,006,845 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 5:40
Mark Salsbery11-Sep-08 5:40 
GeneralRe: Reference Casting question. Pin
peterdrozd11-Sep-08 5:44
peterdrozd11-Sep-08 5:44 
GeneralRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 5:56
Mark Salsbery11-Sep-08 5:56 
GeneralRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 5:59
Mark Salsbery11-Sep-08 5:59 
GeneralRe: Reference Casting question. Pin
peterdrozd11-Sep-08 7:50
peterdrozd11-Sep-08 7:50 
GeneralRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 8:00
Mark Salsbery11-Sep-08 8:00 
QuestionRe: Reference Casting question. Pin
Mark Salsbery11-Sep-08 5:45
Mark Salsbery11-Sep-08 5:45 
QuestionMinGW and namespaces [modified] Pin
piwi13311-Sep-08 1:18
piwi13311-Sep-08 1:18 
Hi @all,
I´m new at Code Project so I hope this is the right place for my question!

I´m a little bit in trouble with C++-Namespaces. I´ve 3 files like

example.cpp
#include <iostream>
#include "include/base/try.h" 
int main (int argc, char** argv)
{
  peng::print2(argc, argv);
  return 0;
}</iostream>


try.h
#ifndef __TRY_H
#define __TRY_H
namespace peng
{
	void print2(int& argc, char**& argv);
}


try.cpp
#include "try.h"
void peng::print2(int& argc, char**& argv)
{
	std::cout<<"hurra"<<std::endl;
}


But I run in the linker-error:
example0.5.cpp:(.text+0x136): undefined reference to 'peng::print2(int&, char**&)'
collect2: ld returned 1 exit status


And I don´t know why! I´m using MinGW Version 5.4.1. an GVim!

Do I have to change some linker-settings?

When I initialize print2() in try.h like
namespace peng
{
	void print2(int& argc, char**& argv)
	{
		std::cout<<"huraa"<<std::endl;
	}
}


it works!

I need some help Wink | ;)

Greetz Stefan

modified on Thursday, September 11, 2008 7:35 AM

QuestionRe: MinGW and namespaces Pin
sashoalm11-Sep-08 1:31
sashoalm11-Sep-08 1:31 
AnswerRe: MinGW and namespaces Pin
piwi13311-Sep-08 1:36
piwi13311-Sep-08 1:36 
GeneralRe: MinGW and namespaces Pin
sashoalm11-Sep-08 1:43
sashoalm11-Sep-08 1:43 
GeneralRe: MinGW and namespaces Pin
piwi13311-Sep-08 1:56
piwi13311-Sep-08 1:56 
GeneralRe: MinGW and namespaces Pin
sashoalm11-Sep-08 2:03
sashoalm11-Sep-08 2:03 
QuestionTo Create CVS File Pin
mikobi11-Sep-08 1:15
mikobi11-Sep-08 1:15 
AnswerRe: To Create CVS File Pin
_AnsHUMAN_ 11-Sep-08 2:10
_AnsHUMAN_ 11-Sep-08 2:10 
GeneralRe: To Create CVS File Pin
mikobi18-Sep-08 21:13
mikobi18-Sep-08 21:13 
Questioncompiler in VC++6.0 Pin
aa_zz11-Sep-08 0:58
aa_zz11-Sep-08 0:58 
QuestionArrays and enums in an extended control Pin
poppabaggins10-Sep-08 4:06
poppabaggins10-Sep-08 4:06 
GeneralRe: Arrays and enums in an extended control Pin
led mike10-Sep-08 5:07
led mike10-Sep-08 5:07 
GeneralRe: Arrays and enums in an extended control Pin
Mark Salsbery10-Sep-08 5:34
Mark Salsbery10-Sep-08 5:34 
GeneralRe: Arrays and enums in an extended control Pin
led mike10-Sep-08 5:42
led mike10-Sep-08 5:42 
AnswerRe: Arrays and enums in an extended control Pin
Mark Salsbery10-Sep-08 5:31
Mark Salsbery10-Sep-08 5:31 
GeneralRe: Arrays and enums in an extended control Pin
poppabaggins10-Sep-08 6:50
poppabaggins10-Sep-08 6:50 
QuestionProblem with encoding in Ms Outlook extension Pin
pawelwaw10-Sep-08 0:36
pawelwaw10-Sep-08 0:36 
AnswerRe: Problem with encoding in Ms Outlook extension Pin
led mike10-Sep-08 5:17
led mike10-Sep-08 5:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.