“Undefined reference to” template class constructor [duplicate]

This question already has answers here: Why can templates only be implemented in the header file? (17 answers) Closed 7 years ago. I have no idea why this is happenning, since I think I have everything properly declared and defined. I have the following program, designed with templates. It’s a simple implementation of a queue, … Read more

Could not load file or assembly … The parameter is incorrect

Recently I met the following exception at C# solution: Error 2 Could not load file or assembly ‘Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b9a188c8922137c6’ or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) This does not depend either on my code or on the name of assembly (like Newtonsoft.Json in this case). When … Read more

Duplicate AssemblyVersion Attribute

I have a project that generates following error on compilation: error CS0579: Duplicate ‘AssemblyVersion’ attribute I have checked the file AssemblyInfo.cs and it looks like there is no duplication there. I found this article on MSDN which addresses a similar problem and following the suggestion in this article fixes the problem as well. Can anyone … Read more

Error in Swift class: Property not initialized at super.init call

I have two classes, Shape and Square class Shape { var numberOfSides = 0 var name: String init(name:String) { self.name = name } func simpleDescription() -> String { return “A shape with \(numberOfSides) sides.” } } class Square: Shape { var sideLength: Double init(sideLength:Double, name:String) { super.init(name:name) // Error here self.sideLength = sideLength numberOfSides = … Read more

Python3: ImportError: No module named ‘_ctypes’ when using Value from module multiprocessing

I am using Ubuntu and have installed Python 2.7.5 and 3.4.0. In Python 2.7.5 I am able to successfully assign a variable x = Value(‘i’, 2), but not in 3.4.0. I am getting: Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/usr/local/lib/python3.4/multiprocessing/context.py”, line 132, in Value from .sharedctypes import Value File … Read more

Undefined symbols for architecture i386: _OBJC_CLASS_$_SKPSMTPMessage”, referenced from: error

I have imported framework for sending email from application in background i.e. SKPSMTPMessage Framework. Can somebody suggest why below error is shown Undefined symbols for architecture i386: “_OBJC_CLASS_$_SKPSMTPMessage”, referenced from: objc-class-ref in ConfirmController.o “_kSKPSMTPPartContentTransferEncodingKey”, referenced from: -[ConfirmController sendEmail] in ConfirmController.o “_kSKPSMTPPartMessageKey”, referenced from: -[ConfirmController sendEmail] in ConfirmController.o “_kSKPSMTPPartContentTypeKey”, referenced from: -[ConfirmController sendEmail] in ConfirmController.o ld: … Read more

libpthread.so.0: error adding symbols: DSO missing from command line

When I’m compiling openvswitch-1.5.0, I’ve encountered the following compile error: gcc -Wstrict-prototypes -Wall -Wno-sign-compare -Wpointer-arith -Wdeclaration-after-statement -Wformat-security -Wswitch-enum -Wunused-parameter -Wstrict-aliasing -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-field-initializers -Wno-override-init -g -O2 -export-dynamic ***-lpthread*** -o utilities/ovs-dpctl utilities/ovs-dpctl.o lib/libopenvswitch.a /home/jyyoo/src/dpdk/build/lib/librte_eal.a /home/jyyoo/src/dpdk/build/lib/libethdev.a /home/jyyoo/src/dpdk/build/lib/librte_cmdline.a /home/jyyoo/src/dpdk/build/lib/librte_hash.a /home/jyyoo/src/dpdk/build/lib/librte_lpm.a /home/jyyoo/src/dpdk/build/lib/librte_mbuf.a /home/jyyoo/src/dpdk/build/lib/librte_ring.a /home/jyyoo/src/dpdk/build/lib/librte_mempool.a /home/jyyoo/src/dpdk/build/lib/librte_malloc.a -lrt -lm /usr/bin/ld: /home/jyyoo/src/dpdk/build/lib/librte_eal.a(eal.o): undefined reference to symbol ‘pthread_create@@GLIBC_2.2.5’ /lib/x86_64-linux-gnu/libpthread.so.0: error … Read more