Reputation: 537
I made a vxWorks project, using Downloadable Kernel Module in vxWorks. It builds perfectly, but when I download it into the simulation environment it will complain about unresolved C++ libraries.
This is the only code
#include <iostream>
int helloworld()
{
std::cout << "HELLO WORLD\n";
return 0;
}
I will get unresolved std::uncaught_exception(), __cxa_end_catch, __gx_personality_v0, std::cout.....etc.
Anyone have had this problem ? It seems like it's just not including the C++ libraries...if so, anyone knows how to add this ?
Thanks.
Upvotes: 2
Views: 2678
Reputation: 11
This is due to your vxworks image configuration. From the vxworks image project you should add cpp components entirely.
Upvotes: 0
Reputation: 148
Are you using the standard simulator? If so, confirm if the kernel Image has all c++ components included.
To do so, create a new kernel Image project, and in the kernel configuration include the iostream component. Although there are other ways, but this should solve the issue.
Better use kprintf, for having a screen output as it is the standard practice.
Upvotes: 0
Reputation: 304
Normally, in "Build Tools" tab of the project properties the "Linker" dropdown list should bring the following parameters for C++ DKM for PPC project:
echo "building $@";
rm -f %OutFile%;
ddump -Ng %Objects% %Libraries% | tclsh $(WIND_BASE)/host/resource/hutils/tcl/munch.tcl -c ppc -tags $(VSB_DIR)/tags/ppc/PPC32/common/dkm.tags > $(OBJ_DIR)/ctdt.c;
%ccompilerprefix%
$(TOOL_PATH)
dcc %DebugModeFlags% $(CC_ARCH_SPEC) -Xdollar-in-ident -Xforce-declarations $(ADDED_CFLAGS)
%Includes% $(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) -D_WRS_KERNEL -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\" $(DEFINES) -o $(OBJ_DIR)/ctdt.o -c $(OBJ_DIR)/ctdt.c;
%linkerprefix% $(TOOL_PATH)dld -tPPCFH:vxworks68 -X -r5 %ToolFlags% -o %OutFile% $(OBJ_DIR)/ctdt.o
%Objects%
%Libraries% $(LIBPATH) $(LIBS) $(ADDED_LIBPATH) $(ADDED_LIBS) && if [ "$(EXPAND_DBG)" = "1" ]; then plink "$@";fi
Check if this is wat you have in your project. Especially around the %Libraries% part.
P.S. Nevermind the formatting - it is just for readability.
Upvotes: 1