compiler-errors

Visual Studio 2017 for Dymola cannot open stdio.h

穿精又带淫゛_ 提交于 2021-02-10 06:44:14
问题 I am trying to use Visual Studio 2017 as a compiler in Dymola 2019. I have installed all the components in VS2017 for C++ (as far as i could find). But when i try to test compiler in Dymola, I get an error message as follows : Compiling and linking the model (Visual C++). ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.9.11 ** Copyright (c) 2017 Microsoft Corporation *****************************************************

Visual Studio 2017 for Dymola cannot open stdio.h

不想你离开。 提交于 2021-02-10 06:44:12
问题 I am trying to use Visual Studio 2017 as a compiler in Dymola 2019. I have installed all the components in VS2017 for C++ (as far as i could find). But when i try to test compiler in Dymola, I get an error message as follows : Compiling and linking the model (Visual C++). ********************************************************************** ** Visual Studio 2017 Developer Command Prompt v15.9.11 ** Copyright (c) 2017 Microsoft Corporation *****************************************************

unknown sqlite db error

我的梦境 提交于 2021-02-10 06:07:27
问题 when trying to insert data into my sqlite db I receive a logcat error "unknown database logindata: , while compiling:". the error message sounds straight forward but I can locate where the issue is. in my DB class or the activity which is inserting the data. error message: unknown database logindata: , while compiling: create table if not exists logindata.db (_id integer primary key autoincrement,username text not null,password text not null); database: public class LoginDB extends

Source missing function body, how is it compiling? [duplicate]

半世苍凉 提交于 2021-02-09 11:51:06
问题 This question already has answers here : Bodiless function in Golang (2 answers) Closed 3 years ago . In the Go lang source code, I see a function declared without any body. https://github.com/golang/go/blob/master/src/math/log10.go#L9 func Log10(x float64) float64 But when I do the same it gives me an error: missing function body for __ https://play.golang.org/p/Ncp-0-8vHB How is this working in the Go source code? I mean how is the math package compiling? Is this source file just for

Source missing function body, how is it compiling? [duplicate]

可紊 提交于 2021-02-09 11:50:23
问题 This question already has answers here : Bodiless function in Golang (2 answers) Closed 3 years ago . In the Go lang source code, I see a function declared without any body. https://github.com/golang/go/blob/master/src/math/log10.go#L9 func Log10(x float64) float64 But when I do the same it gives me an error: missing function body for __ https://play.golang.org/p/Ncp-0-8vHB How is this working in the Go source code? I mean how is the math package compiling? Is this source file just for

C++ Struct that contains a map of itself

↘锁芯ラ 提交于 2021-02-08 13:25:42
问题 Simple question: How do I get this to work? struct A { double whatever; std::unordered_map<std::string, A> mapToMoreA; } g++ error: std::pair<_T1, _T2>::second has incomplete type As far as I understand, when instantiating the map, the compiler needs to know the size of A, but it doesn't know this because the map is declared in A's declaration, so is the only way to get around this to use pointers to A (don't feel like doing that)? 回答1: Most of the time it will depend on the container

C Compile Error: array type has incomplete element type

寵の児 提交于 2021-02-08 13:16:38
问题 #include <stdio.h> typedef struct { int num ; } NUMBER ; int main(void) { struct NUMBER array[99999]; return 0; } I'm getting a compile error: error: array type has incomplete element type I believe the problem is that I'm declaring the array of struct incorrectly. It seems like that's how you declare it when I looked it up. 回答1: struct NUMBER array[99999]; should be NUMBER array[99999]; because you already typedef ed your struct. EDIT: As OP is claiming that what I suggested him is not

How to increase stack size when compiling a C++ program using MinGW compiler

最后都变了- 提交于 2021-02-08 09:55:48
问题 I am trying to compile a program that was provided to me. The program tests the run time of the algorithm quicksort when provided different values. I need to increase the size of the stack to run really large numbers. I read to use the following command: g++ -Wl,--stack,<size> where size is the number to increase the stack. However, this isn't working for me. In command prompt when I typed exactly the following: g++ -Wl,--stack,1000000000 and then hit enter, I get the following message: C:

Compiling with external libraries

邮差的信 提交于 2021-02-08 07:40:08
问题 I am having an issue with compiling one of the sample (example codes) for a C++ based jwt library from a github project: jwt-cpp I cloned it and compiled it using the steps provided in the README file, which seemed successful. After that I did a ldconfig . Now, I am trying to build the example code. #include <iostream> #include "jwt/jwt_all.h" using json = nlohmann::json; int main() { // Setup a signer HS256Validator signer("secret!"); // Create the json payload that expires 01/01/2017 @ 12

How come the compiler thinks this variable isn't constant?

纵饮孤独 提交于 2021-02-08 01:59:10
问题 This is my code: int main() { const int LEN = 5; int x[LEN]; } VS10 says: error C2057: expected constant expression error C2466: cannot allocate an array of constant size 0 error C2133: 'x' : unknown size I even tried the the code in this page and it gives the same problem (I commented the code which gives the error, and uncommented the correct one): http://msdn.microsoft.com/en-us/library/eff825eh%28VS.71%29.aspx If I was trying a crappy compiler, I would think it's a bug in the compiler,